1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-25 23:56:41 +02:00
This commit is contained in:
Ryan Cramer
2019-02-05 08:46:10 -05:00
parent 1215e706e1
commit 09c936dba9

View File

@@ -481,8 +481,9 @@ class WireFileTools extends Wire {
return false;
}
if(strpos($pathname, '//') !== false) {
// URLs or accidental extra slashes not allowed
$pos = strpos($pathname, '//');
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 “//”');
return false;
}