Blacklist | in windows paths too
authorSam Reed <reedy@users.mediawiki.org>
Thu, 9 Feb 2012 00:24:11 +0000 (00:24 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Thu, 9 Feb 2012 00:24:11 +0000 (00:24 +0000)
Ping r110922

includes/filerepo/backend/FSFileBackend.php

index 03e4d87..8b60290 100644 (file)
@@ -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;
                }