Skip to content

[stable27] Respect empty expiryDate value in server - #45481

Merged
AndyScherzinger merged 3 commits into
stable27from
backport/44485/stable27
May 27, 2024
Merged

[stable27] Respect empty expiryDate value in server#45481
AndyScherzinger merged 3 commits into
stable27from
backport/44485/stable27

Conversation

@backportbot

@backportbotbackportbotBot commented May 23, 2024

Copy link
Copy Markdown

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.

Comment threadlib/private/Share20/Manager.php Fixed
Comment threadlib/private/Share20/Manager.php Fixed
Comment threadlib/private/Share20/Manager.php Fixed
@artonge
artongeforce-pushed the backport/44485/stable27 branch from 16961d3 to 78f6480CompareMay 23, 2024 15:02

@AndyScherzingerAndyScherzinger left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🐘

@skjnldsvskjnldsv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🐘

@artonge
artongeforce-pushed the backport/44485/stable27 branch 2 times, most recently from 97d6fa4 to b843a09CompareMay 23, 2024 16:11
Comment threadapps/files_sharing/lib/Controller/ShareAPIController.php Outdated
Comment threadapps/files_sharing/lib/Controller/ShareAPIController.php Outdated
Comment threadbuild/integration/features/bootstrap/Sharing.php
@nfebe
nfebeforce-pushed the backport/44485/stable27 branch 2 times, most recently from 2758e55 to 5e299a1CompareMay 23, 2024 16:45
@nfebe
nfebe enabled auto-merge May 23, 2024 16:48
@artonge
artongeforce-pushed the backport/44485/stable27 branch 2 times, most recently from 0eca300 to f4cc01eCompareMay 24, 2024 07:53
@skjnldsv
skjnldsv disabled auto-merge May 24, 2024 11:36
@skjnldsv
skjnldsvforce-pushed the backport/44485/stable27 branch 2 times, most recently from 6619684 to 6e82249CompareMay 24, 2024 11:39
@skjnldsv

Copy link
Copy Markdown
Member

Still failing @fenn-cs@artonge

@nfebe
nfebeforce-pushed the backport/44485/stable27 branch 2 times, most recently from 48dc40e to efa128bCompareMay 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 <fenn25.fn@gmail.com>
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
@nfebe
nfebeforce-pushed the backport/44485/stable27 branch from efa128b to 03889c8CompareMay 24, 2024 14:31
- 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 <fenn25.fn@gmail.com>
@nfebe
nfebeforce-pushed the backport/44485/stable27 branch from 03889c8 to bdeba65CompareMay 25, 2024 10:19
@AndyScherzinger
AndyScherzinger merged commit e29eb3c into stable27May 27, 2024
@AndyScherzinger
AndyScherzinger deleted the backport/44485/stable27 branch May 27, 2024 10:04
@AltahrimAltahrim mentioned this pull request May 27, 2024
10 tasks
Comment on lines +659 to +660
$expireDate = $this->parseDate($expireDate);
$share->setExpirationDate($expireDate);

Copy link
Copy Markdown
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
Copy Markdown
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 freeto 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.

5 participants

@skjnldsv@nickvergessen@AndyScherzinger@nfebe@github-advanced-security