diff options
author | Git'Fellow <12234510+solracsf@users.noreply.github.com> | 2024-11-19 14:04:05 +0100 |
---|---|---|
committer | Git'Fellow <12234510+solracsf@users.noreply.github.com> | 2024-11-19 14:11:20 +0100 |
commit | 50d071e7d211cd46fdcd8cd349a5e9028e54bf77 (patch) | |
tree | 7291f9373cc99713013d4c2df60e96f5ab8a7d3f /apps | |
parent | 75e6e7ca5ee92c8e6dbe0e7e53ac6a36b96a4a45 (diff) | |
download | nextcloud-server-50d071e7d211cd46fdcd8cd349a5e9028e54bf77.tar.gz nextcloud-server-50d071e7d211cd46fdcd8cd349a5e9028e54bf77.zip |
fix(SetupChecks): Make sure array key is setbackportArrayKeySetupCheks
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/settings/lib/SetupChecks/CheckServerResponseTrait.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/settings/lib/SetupChecks/CheckServerResponseTrait.php b/apps/settings/lib/SetupChecks/CheckServerResponseTrait.php index 3080829cb00..4c7635c5897 100644 --- a/apps/settings/lib/SetupChecks/CheckServerResponseTrait.php +++ b/apps/settings/lib/SetupChecks/CheckServerResponseTrait.php @@ -93,6 +93,10 @@ trait CheckServerResponseTrait { protected function normalizeUrl(string $url, bool $removeWebroot): string { if ($removeWebroot) { $segments = parse_url($url); + if (!isset($segments['scheme']) || !isset($segments['host'])) { + throw new \InvalidArgumentException('URL is missing scheme or host'); + } + $port = isset($segments['port']) ? (':' . $segments['port']) : ''; return $segments['scheme'] . '://' . $segments['host'] . $port; } |