r110991 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110990‎ | r110991 | r110992 >
Date:00:24, 9 February 2012
Author:reedy
Status:ok
Tags:
Comment:
Blacklist | in windows paths too

Ping r110922
Modified paths:
  • /trunk/phase3/includes/filerepo/backend/FSFileBackend.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/backend/FSFileBackend.php
@@ -78,6 +78,7 @@
7979 * Sanity check a relative file system path for validity
8080 *
8181 * @param $path string Normalized relative path
 82+ * @return bool
8283 */
8384 protected function isLegalRelPath( $path ) {
8485 // Check for file names longer than 255 chars
@@ -85,7 +86,7 @@
8687 return false;
8788 }
8889 if ( wfIsWindows() ) { // NTFS
89 - return !preg_match( '![:*?"<>]!', $path );
 90+ return !preg_match( '![:*?"<>|]!', $path );
9091 } else {
9192 return true;
9293 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r110922Added some simple path validation to resolveContainerPath() in FSFileBackend....aaron09:00, 8 February 2012

Status & tagging log