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

[stable27] Respect empty expiryDate value in server #45481

Merged
merged 3 commits into from
May 27, 2024

Conversation

backportbot[bot]
Copy link

@backportbot backportbot bot commented May 23, 2024

Backport of #44485

Warning, This backport's changes differ from the original and might be incomplete ⚠️

Todo

  • Review and resolve any conflicts
  • Remove all the empty commits
  • Amend HEAD commit to remove the line stating to skip CI

Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@backportbot backportbot bot requested review from artonge and nfebe May 23, 2024 14:41
@backportbot backportbot bot added this to the Nextcloud 27.1.10 milestone May 23, 2024
@artonge artonge marked this pull request as ready for review May 23, 2024 14:54
lib/private/Share20/Manager.php Fixed Show fixed Hide fixed
lib/private/Share20/Manager.php Fixed Show fixed Hide fixed
lib/private/Share20/Manager.php Fixed Show fixed Hide fixed
Copy link
Member

@AndyScherzinger AndyScherzinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐘

Copy link
Member

@skjnldsv skjnldsv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐘

@artonge artonge force-pushed the backport/44485/stable27 branch 2 times, most recently from 97d6fa4 to b843a09 Compare May 23, 2024 16:11
@nfebe nfebe force-pushed the backport/44485/stable27 branch 2 times, most recently from 2758e55 to 5e299a1 Compare May 23, 2024 16:45
@nfebe nfebe enabled auto-merge May 23, 2024 16:48
@artonge artonge force-pushed the backport/44485/stable27 branch 2 times, most recently from 0eca300 to f4cc01e Compare May 24, 2024 07:53
@skjnldsv skjnldsv disabled auto-merge May 24, 2024 11:36
@skjnldsv skjnldsv force-pushed the backport/44485/stable27 branch 2 times, most recently from 6619684 to 6e82249 Compare May 24, 2024 11:39
@skjnldsv
Copy link
Member

Still failing @fenn-cs @artonge

@nfebe nfebe force-pushed the backport/44485/stable27 branch 2 times, most recently from 48dc40e to efa128b Compare May 24, 2024 14:08
If `expireDate` is an empty string and not `null` then the server should not set a default.

Signed-off-by: fenn-cs <[email protected]>
- Verify that explicitly sending empty `expireDate` param to server overwrite default

and sets not expiry date, if non is enforced.

- Update tests to avoid converting empty string to date.

Signed-off-by: fenn-cs <[email protected]>
@AndyScherzinger AndyScherzinger merged commit e29eb3c into stable27 May 27, 2024
37 of 38 checks passed
@AndyScherzinger AndyScherzinger deleted the backport/44485/stable27 branch May 27, 2024 10:04
@Altahrim Altahrim mentioned this pull request May 27, 2024
10 tasks
Comment on lines +659 to +660
$expireDate = $this->parseDate($expireDate);
$share->setExpirationDate($expireDate);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is different on master and actually causes a bug in 27...
https://github.com/nextcloud/server/pull/44485/files#diff-dbbe017dd357504abc442a6f1d0305166520ebf80353f42814b3f879a3e241bcR653-R654

OCA\Talk\Share\Helper\ShareAPIController::createShare(): Argument #4 ($expireDate) must be of type string, DateTime given, called in /apps/files_sharing/lib/Controller/ShareAPIController.php on line 786

Seems it was dropped on a rebase or when redoing the PR

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is mixup between #44838 the follow up #44916 and this PR, since the earlier two where not backported, incompatibilities came up. Just filed : #45749

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

Successfully merging this pull request may close these issues.

4 participants