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]: When creating email share expiry date is set by default without enforcement #44219

Closed
8 of 9 tasks
ElSi-DVT opened this issue Mar 15, 2024 · 9 comments · Fixed by #44291 or #44485
Closed
8 of 9 tasks

[Bug]: When creating email share expiry date is set by default without enforcement #44219

ElSi-DVT opened this issue Mar 15, 2024 · 9 comments · Fixed by #44291 or #44485
Assignees
Labels
1. to develop Accepted and waiting to be taken care of 27-feedback bug

Comments

@ElSi-DVT
Copy link

ElSi-DVT commented Mar 15, 2024

⚠️ This issue respects the following points: ⚠️

Bug description

When creating an email share with the option "Set expiration date" unchecked and "Enforce expiry date" unchecked, the default expiry date is set anyway.
You can see it by clicking "customize link".

This is how it looks like when creating the email share:
grafik

This is how it looks like when customizing the share afterwards:
grafik

After unchecking "Set expiration date" and updating share again, the values stays ok.

Steps to reproduce

  1. Configure the Sharing options like this.
    • Allow users to share via link end emails
    • Always ask for a password
    • Enforce password protection
    • Set default expiry date -> Expire after 30 day(s)
    • Enforce expiry date
  2. Create an email share and uncheck the option "Set expiration date"
  3. Click on "customize link" and see that it's wrong.
  4. Uncheck "Set expiration date" again and update the link.
  5. Click on "customize link" again and see that now it worked how it should work in first place.

Expected behavior

If the option "Set expiration date" is unchecked when creating the share, it should be stored correctly in the database like this and not only at the second updating

Nextcloud Server version

27.1.7 28.0.3

@ElSi-DVT ElSi-DVT added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Mar 15, 2024
@susnux
Copy link
Contributor

susnux commented Mar 15, 2024

cc @Altahrim

@sorbaugh
Copy link
Contributor

also cc-ing @fenn-cs

@Altahrim Altahrim added 1. to develop Accepted and waiting to be taken care of and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Mar 18, 2024
@Altahrim
Copy link
Collaborator

When creating the share, the frontend don't send any info on expireDate:

{
  "path":"/file.test",
  "permissions":1,
  "shareType":4,
  "shareWith":"mail@test.com",
  "attributes":"[]"
}

In this case, backend use the default

During update, frontend send an empty expireDate and backend update it:

{
  "permissions":"17",
  "attributes":"[]",
  "note":"",
  "expireDate":"",
  "label":"",
  "password":"",
  "hideDownload":"false"
}

I think frontend should send the info so the backend don't have to use default

@ElSi-DVT
Copy link
Author

ElSi-DVT commented Apr 2, 2024

@fenn-cs this bug still exists in 27.1.8

@ElSi-DVT
Copy link
Author

@susnux @Altahrim this bug still exists in 27.1.9

@susnux susnux reopened this Apr 29, 2024
@susnux
Copy link
Contributor

susnux commented Apr 29, 2024

@fenn-cs is working on this in #44485

@susnux susnux moved this to 🏗️ In progress in 📁 Files team Apr 29, 2024
@github-project-automation github-project-automation bot moved this from 🏗️ In progress to ☑️ Done in 📁 Files team May 23, 2024
@ElSi-DVT
Copy link
Author

Bug still exists in 28.0.6

@nfebe
Copy link
Contributor

nfebe commented Jun 19, 2024

Bug still exists in 28.0.6

Was tagged for 28.0.7 in #45604

@ElSi-DVT
Copy link
Author

Sorry my fault, didn't notice it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of 27-feedback bug
Projects
Status: ☑️ Done
6 participants