From 01a1c507c8adacf0c97273f9f3f2da95ae1e0987 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Thu, 9 Feb 2012 00:24:11 +0000 Subject: [PATCH] Blacklist | in windows paths too Ping r110922 --- includes/filerepo/backend/FSFileBackend.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- 2.20.1