Skip to content

[stable30] fix(dav): file drop nickname - #53279

Merged
AndyScherzinger merged 3 commits into
stable30from
backport/53278/stable30
Jun 5, 2025
Merged

[stable30] fix(dav): file drop nickname#53279
AndyScherzinger merged 3 commits into
stable30from
backport/53278/stable30

Conversation

@backportbot

@backportbot backportbot Bot commented Jun 3, 2025

Copy link
Copy Markdown

Backport of PR #53278

@backportbot
backportbot Bot requested a review from skjnldsv June 3, 2025 08:08
@backportbot backportbot Bot added this to the Nextcloud 30.0.12 milestone Jun 3, 2025
@skjnldsv skjnldsv changed the title [stable30] [stable31] fix(dav): file drop nickname [stable30] fix(dav): file drop nickname Jun 3, 2025
@skjnldsv
skjnldsv requested review from a team, artonge, nickvergessen, provokateurin and sorbaugh and removed request for a team June 3, 2025 08:08
$isFileRequest = false;
$attributes = $this->share->getAttributes();
$nickName = $request->hasHeader('X-NC-Nickname') ? urldecode($request->getHeader('X-NC-Nickname')) : null;
$nickName = $request->hasHeader('X-NC-Nickname') ? trim(urldecode($request->getHeader('X-NC-Nickname'))) : null;

Check notice

Code scanning / Psalm

PossiblyNullArgument

Argument 1 of urldecode cannot be null, possibly null value provided
Comment thread apps/dav/lib/Files/Sharing/FilesDropPlugin.php Fixed
@skjnldsv
skjnldsv force-pushed the backport/53278/stable30 branch from 444c84c to e38f9c6 Compare June 3, 2025 08:21
Comment thread apps/dav/lib/Files/Sharing/FilesDropPlugin.php Fixed
@skjnldsv
skjnldsv requested review from a team and nfebe and removed request for a team June 3, 2025 08:44
@skjnldsv

skjnldsv commented Jun 3, 2025

Copy link
Copy Markdown
Member

/compile

@nextcloud-bot nextcloud-bot mentioned this pull request Jun 4, 2025
11 tasks
@AndyScherzinger
AndyScherzinger enabled auto-merge June 4, 2025 10:03
@AndyScherzinger
AndyScherzinger force-pushed the backport/53278/stable30 branch from 21353c9 to 0f1d737 Compare June 4, 2025 10:29
@skjnldsv
skjnldsv force-pushed the backport/53278/stable30 branch 3 times, most recently from c97718d to 71c9756 Compare June 5, 2025 07:01
@skjnldsv

skjnldsv commented Jun 5, 2025

Copy link
Copy Markdown
Member

/compile

// We need a valid nickname for file requests
if ($isFileRequest && ($nickName == null || trim($nickName) === '')) {
throw new MethodNotAllowed('Nickname is required for file requests');
if ($isFileRequest && !$nickName) {

Check notice

Code scanning / Psalm

RiskyTruthyFalsyComparison

Operand of type null|string contains type string, which can be falsy and truthy. This can cause possibly unexpected behavior. Use strict comparison instead.
skjnldsv and others added 3 commits June 5, 2025 09:58
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@skjnldsv
skjnldsv force-pushed the backport/53278/stable30 branch from 5cfa427 to 04b5d37 Compare June 5, 2025 07:58
@AndyScherzinger
AndyScherzinger merged commit bbf7920 into stable30 Jun 5, 2025
@AndyScherzinger
AndyScherzinger deleted the backport/53278/stable30 branch June 5, 2025 08:34
@nextcloud-bot nextcloud-bot mentioned this pull request Sep 25, 2025
2 tasks
@blizzz blizzz mentioned this pull request Oct 14, 2025
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.

6 participants