diff options
author | 2025-03-02 19:32:33 -0800 | |
---|---|---|
committer | 2025-03-02 19:32:33 -0800 | |
commit | 8b16dd20f6544af3eedf286e23c0d34ab525736c (patch) | |
tree | ec284e22a046c4c8e9626e3fa64a000a2747bf84 /lib/url.php | |
parent | b183aa798af48af556496c42780d6e844172cf44 (diff) | |
parent | 00a24e2f694a319a5e6cb070dddfff2dae892378 (diff) | |
download | rss-bridge-master.tar.gz rss-bridge-master.tar.zst rss-bridge-master.zip |
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; |