From: Sam Reed Date: Thu, 9 Feb 2012 00:24:11 +0000 (+0000) Subject: Blacklist | in windows paths too X-Git-Tag: 1.31.0-rc.0~24848 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/supprimer.php?a=commitdiff_plain;h=01a1c507c8adacf0c97273f9f3f2da95ae1e0987;p=lhc%2Fweb%2Fwiklou.git Blacklist | in windows paths too Ping r110922 --- diff --git a/includes/filerepo/backend/FSFileBackend.php b/includes/filerepo/backend/FSFileBackend.php index 03e4d87cbd..8b602905c2 100644 --- a/includes/filerepo/backend/FSFileBackend.php +++ b/includes/filerepo/backend/FSFileBackend.php @@ -78,6 +78,7 @@ class FSFileBackend extends FileBackendStore { * Sanity check a relative file system path for validity * * @param $path string Normalized relative path + * @return bool */ protected function isLegalRelPath( $path ) { // Check for file names longer than 255 chars @@ -85,7 +86,7 @@ class FSFileBackend extends FileBackendStore { return false; } if ( wfIsWindows() ) { // NTFS - return !preg_match( '![:*?"<>]!', $path ); + return !preg_match( '![:*?"<>|]!', $path ); } else { return true; }