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

[Bug]: Cannot Adjust Public Share Link Expiration Date Below Maximum Allowed Period #50787

Closed
4 of 8 tasks
yemkareems opened this issue Feb 13, 2025 · 3 comments · Fixed by #50820
Closed
4 of 8 tasks
Assignees

Comments

@yemkareems
Copy link
Contributor

⚠️ This issue respects the following points: ⚠️

Bug description

  1. Create a new public share link
  2. Set expiration date to "2025/02/05"
  3. Click "Create share"
    Result: System automatically changes date to "2025/02/12" (14 days maximum)
    Expected: System should accept any date up to the maximum allowed period

Steps to reproduce

  1. I created a new share with a password and expireDate

Image

  1. However in this case the request payload is missing the expireDate attribute{
    "path": "/sharenewfolder",
    "shareType": 3,
    "password": "mjADqFcepJ123456789",
    "attributes": "[]"
    }

Hence it is setting it to default 7 days from today(06/02/2025) and not the original date set by the user ie 20/02/2025.

The 7 days is set in the backend by admin

  1. I tried updating the share and at that time expireDate is getting passed in the request

{
"permissions": "17",
"attributes": "[]",
"note": "",
"expireDate": "2025-02-20",
"label": "",
"password": "3|$argon2id$v=19$m=65536,t=4,p=1$SnlCOC51ZmlvOGM2TEVTSA$vtmy0P8Q0iERCFmECIW4xh+LZFNnJ3wvxxpDCYf48j0",
"hideDownload": "false"
}

So the issue is reproducible while creating the share as explained by the customer. I am on NC 29.0.11. Please check and let me know if you need more information from my side.

Similar bug is reported by one more customer on nc 30.0.5. for some reason i am not able uncheck the password but i unset the enable link expiration

Image

{
"path": "/sharenewfolder",
"shareType": 3,
"password": "FCBezCZ2c6",
"expireDate": "2025-02-06",
"attributes": "[]"
}

Here i see the default expireDate is getting passed in the request although Enable link expiration is unchecked.

When i update the share with the same checkbox unchecked the request is

{
"permissions": "17",
"attributes": "[]",
"note": "",
"expireDate": "",
"label": "",
"password": "3|$argon2id$v=19$m=65536,t=4,p=1$cGhyLkh0Y0NXRzd6Ym54Vg$f+OATGrTVM37ElgCj8bzsvdQi4qHa5RqgVjktcm145s",
"hideDownload": "false"
}

So while creating the share there is a issue as explained by customer. NC 30.0.5. Please check and let me know if you need more info from my side.

Expected behavior

expiryDate set by user should take effect. If no expiryDate is set in second case then the link should not have any expiry date at all

Nextcloud Server version

29

Operating system

None

PHP engine version

None

Web server

None

Database engine version

None

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

List of activated Apps

Nextcloud Signing status

Nextcloud Logs

Additional info

No response

@yemkareems yemkareems added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Feb 13, 2025
@Pytal Pytal self-assigned this Feb 13, 2025
@nfebe
Copy link
Contributor

nfebe commented Feb 14, 2025

Fixed by #50655

@nfebe nfebe closed this as completed Feb 14, 2025
@nfebe nfebe removed the 0. Needs triage Pending check for reproducibility or if it fits our roadmap label Feb 14, 2025
@sorbaugh
Copy link
Contributor

cc @Pytal , thanks @nfebe !

@Pytal
Copy link
Member

Pytal commented Feb 14, 2025

Second bug is still present

Fix at #50820

@Pytal Pytal reopened this Feb 14, 2025
@susnux susnux moved this to 🏗️ In progress in 📁 Files team Feb 18, 2025
@github-project-automation github-project-automation bot moved this from 🏗️ In progress to ☑️ Done in 📁 Files team Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ☑️ Done
5 participants