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

Copy link
Copy Markdown

Backport of PR #53278

@backportbot
backportbotBot requested a review from skjnldsvJune 3, 2025 08:08
@backportbotbackportbotBot added this to the Nextcloud 30.0.12 milestone Jun 3, 2025
@skjnldsvskjnldsv changed the title [stable30] [stable31] fix(dav): file drop nickname[stable30] fix(dav): file drop nicknameJun 3, 2025
@skjnldsv
skjnldsv requested review from a team, artonge, nickvergessen, provokateurin and sorbaugh and removed request for a teamJune 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 threadapps/dav/lib/Files/Sharing/FilesDropPlugin.php Fixed
@skjnldsv
skjnldsvforce-pushed the backport/53278/stable30 branch from 444c84c to e38f9c6CompareJune 3, 2025 08:21
Comment threadapps/dav/lib/Files/Sharing/FilesDropPlugin.php Fixed
@skjnldsv
skjnldsv requested review from a team and nfebe and removed request for a teamJune 3, 2025 08:44
@skjnldsv

Copy link
Copy Markdown
Member

/compile

@nextcloud-botnextcloud-bot mentioned this pull request Jun 4, 2025
11 tasks
@AndyScherzinger
AndyScherzingerforce-pushed the backport/53278/stable30 branch from 21353c9 to 0f1d737CompareJune 4, 2025 10:29
@skjnldsv
skjnldsvforce-pushed the backport/53278/stable30 branch 3 times, most recently from c97718d to 71c9756CompareJune 5, 2025 07:01
@skjnldsv

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.
skjnldsvand 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
skjnldsvforce-pushed the backport/53278/stable30 branch from 5cfa427 to 04b5d37CompareJune 5, 2025 07:58
@AndyScherzinger
AndyScherzinger merged commit bbf7920 into stable30Jun 5, 2025
@AndyScherzinger
AndyScherzinger deleted the backport/53278/stable30 branch June 5, 2025 08:34
@nextcloud-botnextcloud-bot mentioned this pull request Sep 18, 2025
@nextcloud-botnextcloud-bot mentioned this pull request Sep 25, 2025
2 tasks
@blizzzblizzz mentioned this pull request Oct 14, 2025
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.

6 participants

@skjnldsv@nickvergessen@provokateurin@github-advanced-security@AndyScherzinger@nextcloud-command