mirror of
https://github.com/processwire/processwire.git
synced 2025-08-26 08:04:38 +02:00
Attempt to fix processwire/processwire-issues#801
This commit is contained in:
@@ -481,8 +481,9 @@ class WireFileTools extends Wire {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(strpos($pathname, '//') !== false) {
|
$pos = strpos($pathname, '//');
|
||||||
// URLs or accidental extra slashes not allowed
|
if($pos !== false && $pos !== strpos($this->wire('config')->paths->assets, '//')) {
|
||||||
|
// URLs or accidental extra slashes not allowed, unless they also appear in a known safe system path
|
||||||
if($throw) throw new WireException('pathname may not contain double slash “//”');
|
if($throw) throw new WireException('pathname may not contain double slash “//”');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user