mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-30 21:30:14 +02:00
fix(url): disallowed wonky path (#4386)
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user