diff options
Diffstat (limited to 'lib/url.php')
-rw-r--r-- | lib/url.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/url.php b/lib/url.php index 993fef96..9a1b59ad 100644 --- a/lib/url.php +++ b/lib/url.php @@ -111,6 +111,9 @@ final class Url if (!str_starts_with($path, '/')) { throw new UrlException(sprintf('Path must start with forward slash: %s', $path)); } + if (str_starts_with($path, '//')) { + throw new UrlException(sprintf('Illegal path (too many forward slashes): %s', $path)); + } $clone = clone $this; $clone->path = $path; return $clone; |