aboutsummaryrefslogtreecommitdiff
path: root/lib/url.php
diff options
context:
space:
mode:
authorGravatar Anshul Gupta <ansg191@anshulg.com> 2025-03-02 19:32:33 -0800
committerGravatar GitHub <noreply@github.com> 2025-03-02 19:32:33 -0800
commit8b16dd20f6544af3eedf286e23c0d34ab525736c (patch)
treeec284e22a046c4c8e9626e3fa64a000a2747bf84 /lib/url.php
parentb183aa798af48af556496c42780d6e844172cf44 (diff)
parent00a24e2f694a319a5e6cb070dddfff2dae892378 (diff)
downloadrss-bridge-master.tar.gz
rss-bridge-master.tar.zst
rss-bridge-master.zip
Merge branch 'RSS-Bridge:master' into masterHEADmaster
Diffstat (limited to 'lib/url.php')
-rw-r--r--lib/url.php3
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;