#7496 Don`t allow upload of files with extension .part
This commit is contained in:
parent
5b5c3a1773
commit
327094d557
|
@ -1388,6 +1388,12 @@ class OC_Util {
|
||||||
if (\OC\Files\Filesystem::isIgnoredDir($trimmed)) {
|
if (\OC\Files\Filesystem::isIgnoredDir($trimmed)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$path_parts = pathinfo($trimmed);
|
||||||
|
if ($path_parts['extension'] === 'part') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
foreach (str_split($trimmed) as $char) {
|
foreach (str_split($trimmed) as $char) {
|
||||||
if (strpos(\OCP\Constants::FILENAME_INVALID_CHARS, $char) !== false) {
|
if (strpos(\OCP\Constants::FILENAME_INVALID_CHARS, $char) !== false) {
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue