[-] BO : Upload image name with trailing slash in name
This commit is contained in:
@@ -60,7 +60,7 @@
|
||||
$tem[$k] = $v;
|
||||
}
|
||||
|
||||
$tem['path'] = backslashToSlash($path);
|
||||
$tem['path'] = addslashes(backslashToSlash($path));
|
||||
$tem['type'] = "file";
|
||||
$tem['size'] = transformFileSize($tem['size']);
|
||||
$tem['ctime'] = date(DATE_TIME_FORMAT, $tem['ctime']);
|
||||
@@ -73,7 +73,7 @@
|
||||
$info .= sprintf(", %s:'%s'", $k, $v);
|
||||
}
|
||||
|
||||
$info .= sprintf(", url:'%s'", getFileUrl($path));
|
||||
$info .= sprintf(", url:'%s'", addslashes(getFileUrl($path)));
|
||||
$info .= sprintf(", tipedit:'%s'", TIP_DOC_RENAME);
|
||||
|
||||
|
||||
|
||||
@@ -99,9 +99,9 @@
|
||||
{
|
||||
$v = transformFileSize($v);
|
||||
}
|
||||
echo (($j++ > 1)?",":'') . "'" . $k . "':'" . $v . "'";
|
||||
echo (($j++ > 1)?",":'') . "'" . addslashes($k) . "':'" . addslashes($v) . "'";
|
||||
}
|
||||
echo (($j++ > 1)?",":'') . "'url':'" . getFileUrl($file['path']) . "'";
|
||||
echo (($j++ > 1)?",":'') . "'url':'" . addslashes(getFileUrl($file['path'])) . "'";
|
||||
echo "}\n";
|
||||
}
|
||||
echo "};</script>\n";
|
||||
|
||||
@@ -33,15 +33,15 @@
|
||||
$this->fileInfo['atime'] = $this->fileStat[8];
|
||||
$this->fileInfo['ctime'] = $this->fileStat[10];
|
||||
$this->fileInfo['mtime'] = $this->fileStat[9];
|
||||
$this->fileInfo['path'] = $path;
|
||||
$this->fileInfo['name'] = basename($path);
|
||||
$this->fileInfo['path'] = addslashes($path);
|
||||
$this->fileInfo['name'] = addslashes(basename($path));
|
||||
$this->fileInfo['is_writable'] = $this->isWritable();
|
||||
$this->fileInfo['is_readable'] = $this->isReadable();
|
||||
}elseif(is_dir($this->filePath))
|
||||
{
|
||||
$this->fileStat = @stat($path);
|
||||
$this->fileInfo['name'] = basename($path);
|
||||
$this->fileInfo['path'] = $path;
|
||||
$this->fileInfo['name'] = addslashes(basename($path));
|
||||
$this->fileInfo['path'] = addslashes($path);
|
||||
$this->fileInfo['atime'] = $this->fileStat[8];
|
||||
$this->fileInfo['ctime'] = $this->fileStat[10];
|
||||
$this->fileInfo['mtime'] = $this->fileStat[9];
|
||||
|
||||
Reference in New Issue
Block a user