Skip to content

Conversation

@backportbot
Copy link

@backportbot backportbot bot commented Sep 13, 2024

Backport of #47883

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

Todo

  • Review and resolve any conflicts
  • 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.

susnux and others added 2 commits September 15, 2024 21:40
We basically mock the way `URLGenerator::getAbsoluteURL` works,
so we must make sure that the URL might already contain the webroot.
Because `baseURL` and `cliURL` also contain the webroot we need to remove
the webroot from the URL first.

Co-authored-by: Ferdinand Thiessen <[email protected]>
Co-authored-by: Daniel <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
… path

Co-authored-by: Ferdinand Thiessen <[email protected]>
Co-authored-by: Côme Chilliet <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
@kesselb kesselb force-pushed the backport/47883/stable30 branch from a2b1aaa to 71d870d Compare September 15, 2024 19:40
@kesselb kesselb marked this pull request as ready for review September 15, 2024 19:40
@kesselb
Copy link
Contributor

kesselb commented Sep 15, 2024

Conflicts:

Screenshot from 2024-09-15 21-39-00

if ($removeWebroot) {
$segments = parse_url($url);
$port = isset($segments['port']) ? (':' . $segments['port']) : '';
return $segments['scheme'] . '://' . $segments['host'] . $port;

Check notice

Code scanning / Psalm

PossiblyUndefinedArrayOffset

Possibly undefined array key $segments['scheme'] on array{fragment?: string, host?: string, pass?: string, path?: string, port?: int, query?: string, scheme?: string, user?: string}|false
if ($removeWebroot) {
$segments = parse_url($url);
$port = isset($segments['port']) ? (':' . $segments['port']) : '';
return $segments['scheme'] . '://' . $segments['host'] . $port;

Check notice

Code scanning / Psalm

PossiblyUndefinedArrayOffset

Possibly undefined array key $segments['host'] on array{fragment?: string, host?: string, pass?: string, path?: string, port?: int, query?: string, scheme?: string, user?: string}|false
@susnux susnux merged commit 77321bc into stable30 Sep 18, 2024
@susnux susnux deleted the backport/47883/stable30 branch September 18, 2024 22:19
@Altahrim Altahrim mentioned this pull request Oct 1, 2024
4 tasks
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