Skip to content
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

Public link share expiry interaction with core #286

Open
phil-davis opened this issue Mar 11, 2020 · 7 comments
Open

Public link share expiry interaction with core #286

phil-davis opened this issue Mar 11, 2020 · 7 comments

Comments

@phil-davis
Copy link
Contributor

phil-davis commented Mar 11, 2020

The password policy public link expiration settings can conflict with core settings, e.g. link expiry set to 5 days in password policy:
Screenshot_2020-03-11 Settings - ownCloud(1)
Link expiry set to 7 days in core:
Screenshot_2020-03-11 Settings - ownCloud
Create a public link:
Screenshot_2020-03-11 Files - ownCloud

core fills in the default expiry date, then when you click "Share" to create the link, password policy in the backend complains that "The expiration date cannot exceed 5 days."

This problem is "just a nuisance" - the user can adjust the expiration date earlier and the link gets created.

See #286 (comment) - this is existing "annoying" behaviour with core 10.3.2

@phil-davis
Copy link
Contributor Author

phil-davis commented Mar 11, 2020

Now do not enable "set default expiration date" in core:
Screenshot_2020-03-11 Settings - ownCloud(2)
And when you try to make a public link you get:
Screenshot_2020-03-11 Files - ownCloud(1)

Then you use the date picker and choose a date. The date picker gives you no clue what the maximum expiry is. You choose some date in the future, then:
Screenshot_2020-03-11 Files - ownCloud(2)

Finally you get told "The expiration date cannot exceed 5 days." At this point you have enough clues to choose a valid expiration date.

It would be nice if it filled in the maximum from the password policy setting at the start.

@phil-davis
Copy link
Contributor Author

Someone remind me - what is the real point of the settings in password policy vs core?

In password policy you can set different maximum expiration depending if a password is set on the public link share or not. Is that the only extra functionality that is available?

@pako81
Copy link

pako81 commented Mar 11, 2020

#286 (comment) caused by a missing check for the share type (public link) here https://github.com/owncloud/password_policy/blob/master/lib/HooksHandler.php#L201.

So the proposed fix would need to add two additional checks: one at the above-mentioned place, the other one at https://github.com/owncloud/password_policy/blob/master/lib/HooksHandler.php#L195, which will solve #287.

So one fix for two issues: 1. fix creation of ordinary shares when public link expiry is set and 2. fix conflicts between core and password_policy expiration policies.

@pako81
Copy link

pako81 commented Mar 11, 2020

In password policy you can set different maximum expiration depending if a password is set on the public link share or not. Is that the only extra functionality that is available?

Yes, it is. IMHO we should just get rid of the core settings since this is introducing redundancy.

@phil-davis
Copy link
Contributor Author

Yes, it is. IMHO we should just get rid of the core settings since this is introducing redundancy.

The core settings let you specify a default expiration date without enforcing it (and you can enforce it if you want)

Maybe define a combined set of requirements for the feature, then decide if the combined requirements are implemented in core (and remove existing link expiration settings from password policy) or the reverse.

@HanaGemela HanaGemela mentioned this issue Mar 16, 2020
32 tasks
@phil-davis
Copy link
Contributor Author

I tested the above with core 10.3.2 - the "annoying" behaviour is the same.
So this is not a regression in core 10.4.0.

IMO the "annoyance" can be improved in some future software version (of core and/or password_policy, wherever the code needs to be enhanced). That work can scheduled as normal.

@VicDeo
Copy link
Member

VicDeo commented Mar 16, 2020

In password policy you can set different maximum expiration depending if a password is set on the public link share or not. Is that the only extra functionality that is available?
Yes, it is. IMHO we should just get rid of the core settings since this is introducing redundancy.

I think reusing of the core setting in the app is better approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants