New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OC Sharing API removes expiration date when updating a share with a password #14826
Comments
Related: #10671 |
@schiesbn |
The same problem when you do it from the desktop client |
Setting to 8.1 to keep this in mind @DeepDiver1975 especially that it will affect the clients more in the future. |
So I just ran a few tests and it seems that it even worse. So it seems that for some reason we handle adding a password differently from modifying any of the other properties. (permission expire date). I do not really get why we do this (maybe some historic reason?). If the old expire date is retrieved in https://github.com/owncloud/core/blob/master/lib/private/share/share.php#L668 (which works) and then passed in https://github.com/owncloud/core/blob/master/lib/private/share/share.php#L711 things still break. So it seems like the whole bunch of functions called after that are somewhat broken with respect to adding a password. I'll see what happens if we just add some logic to update the password in the same way we update the expire date. |
I don't think there is any specific reason for resetting the share when changing the password. It doesn't even make sense. |
WIP PR in #14868 |
Fixed in #14987 |
Steps to reproduce
Share a folder by link.
Update the public share adding an expiration date
2.1 get the shares ids:
2.2 Use the share id for your folder:
Add a password
Expected behaviour
A password is added and the expiration date is kept.
Actual behaviour
Password is added and expiration date is lost.
Server configuration
Operating system:
Ubuntu 14.04 LTS
Web server:
Apache
Database:
MySQL
PHP version:
5.5.9
ownCloud version: (see ownCloud admin page)
{"installed":true,"maintenance":false,"version":"8.0.1.1","versionstring":"8.0.1","edition":"Enterprise"}
Updated from an older ownCloud or fresh install:
Updated
List of activated apps:
Default in enterprise version.
The content of config/config.php:
Are you using external storage, if yes which one: local/smb/sftp/...
no
Are you using encryption: yes
Client configuration
*browser
Chrome
The text was updated successfully, but these errors were encountered: