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

expireDate can be specified in any date-time format #36558

Closed
phil-davis opened this issue Dec 10, 2019 · 9 comments
Closed

expireDate can be specified in any date-time format #36558

phil-davis opened this issue Dec 10, 2019 · 9 comments

Comments

@phil-davis
Copy link
Contributor

When using the sharing API and sending expireDate in a request to create/modify a share, the documentation https://doc.owncloud.com/server/developer_manual/core/apis/ocs-share-api.html#create-a-new-share says:

An expire date for public link shares. This argument expects a date string in the following format 'YYYY-MM-DD'

But if you send the expireDate in any format that https://www.php.net/manual/en/function.strtotime.php understands, then that also works - e.g. +3 days or 01/02/2020

We are adding a feature to have expiry dates for user and group shares. The feature PR also behaves like this, allowing an extensive range of ways to send expireDate

Is it OK that this extended behaviour works?

@phil-davis
Copy link
Contributor Author

I am asking this because, if we keep allowing the extended behaviour to work, then there might be some clients that (maybe unintentionally) use it - send +7 days instead of calculating the actual date 7 days in the future and sending that.

Once clients are using the flexibility, then we will need to retain it on other server implementations (e.g. OCIS)

@micbar @PVince81 @DeepDiver1975 or whoever should have an opinion.

@phil-davis
Copy link
Contributor Author

I added this to 10.4.0 project so we discuss it along with the user-group-share-expiry review.

@micbar
Copy link
Contributor

micbar commented Dec 10, 2019

@pmaier1 @phil-davis @felixheidecke @jvillafanez Let us sit together.

@jvillafanez
Copy link
Member

From my point of view, "YYYY-MM-DD" is the one that is officially supported. The rest isn't officially supported (unless @pmaier1 says otherwise) and they're in a "use it at your own risk if it works" state, so if something breaks, you've been warned.

@phil-davis
Copy link
Contributor Author

Any more opinions?
Otherwise I will close this and the behaviour can be left as it is - specifying expiry dates in various date formats works but is not officially supported and might break/change any time.

@jvillafanez
Copy link
Member

We can leave the ticket open. It's something to discuss if we want to enforce an specific format or not, but I don't think it's a priority at the moment.

@phil-davis
Copy link
Contributor Author

I remved from the 10.4 project, because this is now a discussion issue and not to be "finished" for 10.4

@stale
Copy link

stale bot commented Sep 19, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the status/STALE label Sep 19, 2021
@stale
Copy link

stale bot commented Sep 20, 2021

This issue has been automatically closed.

@stale stale bot closed this as completed Sep 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants