Fixes #1486
This commit is contained in:
parent
92cfbd30a4
commit
bd85c55393
|
@ -95,8 +95,15 @@ class m_bro {
|
||||||
if (substr($dir,0,strlen($root))!=$root) {
|
if (substr($dir,0,strlen($root))!=$root) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// recomposer le chemin
|
// recomposer le chemin
|
||||||
$dir = $dir . '/' . $file;
|
$dir = $dir . '/' . $file;
|
||||||
|
|
||||||
|
# Si on tente de mettre un '..' alors erreur
|
||||||
|
if ( preg_match("/\/\.\.\//", $dir) || preg_match("/\/\.\.$/", $dir) ) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if ($strip) {
|
if ($strip) {
|
||||||
$dir=substr($dir,strlen($root));
|
$dir=substr($dir,strlen($root));
|
||||||
} else {
|
} else {
|
||||||
|
@ -453,9 +460,8 @@ class m_bro {
|
||||||
|
|
||||||
if ($new[0] != '/') {
|
if ($new[0] != '/') {
|
||||||
$new = $old . '/' . $new;
|
$new = $old . '/' . $new;
|
||||||
} else {
|
|
||||||
$new = $this->convertabsolute($new,0);
|
|
||||||
}
|
}
|
||||||
|
$new = $this->convertabsolute($new,0);
|
||||||
|
|
||||||
if (!$new) {
|
if (!$new) {
|
||||||
$err->raise("bro",_("File or folder name is incorrect"));
|
$err->raise("bro",_("File or folder name is incorrect"));
|
||||||
|
|
Loading…
Reference in New Issue