diff options
author | Vincent Petry <pvince81@owncloud.com> | 2017-03-24 11:28:54 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2017-04-26 16:12:48 +0200 |
commit | 1c771c097a478ee461bfbc3447c84a4abea22c8c (patch) | |
tree | d3b4fe7cb413f7a32584a993ecb6bccc5fc4fcd0 /lib | |
parent | 327094d5574ed9cf330edcf33529ef7745b7b5f0 (diff) | |
download | nextcloud-server-1c771c097a478ee461bfbc3447c84a4abea22c8c.tar.gz nextcloud-server-1c771c097a478ee461bfbc3447c84a4abea22c8c.zip |
Use regex to detect part files
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/legacy/util.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/legacy/util.php b/lib/private/legacy/util.php index d2012835980..d49599cb8a1 100644 --- a/lib/private/legacy/util.php +++ b/lib/private/legacy/util.php @@ -1389,8 +1389,8 @@ class OC_Util { return false; } - $path_parts = pathinfo($trimmed); - if ($path_parts['extension'] === 'part') { + // detect part files + if (preg_match('/' . \OCP\Files\FileInfo::BLACKLIST_FILES_REGEX . '/', $trimmed) !== 0) { return false; } |