r5958 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r5957‎ | r5958 | r5959 >
Date:00:15, 18 October 2004
Author:kateturner
Status:old
Tags:
Comment:
security_fix
Modified paths:
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Title.php
@@ -770,7 +770,7 @@
771771 if( Namespace::getUser() == $this->mNamespace
772772 and preg_match("/\\.(css|js)$/", $this->mTextform )
773773 and !$wgUser->isSysop()
774 - and !preg_match('/^'.preg_quote($wgUser->getName(), '/').'/', $this->mTextform) )
 774+ and !preg_match('/^'.preg_quote($wgUser->getName(), '/').'\//', $this->mTextform) )
775775 { return false; }
776776 $ur = $wgUser->getRights();
777777 foreach ( $this->getRestrictions() as $r ) {
@@ -837,7 +837,7 @@
838838 */
839839 function userCanEditCssJsSubpage() {
840840 global $wgUser;
841 - return ( $wgUser->isSysop() or preg_match('/^'.preg_quote($wgUser->getName()).'/', $this->mTextform) );
 841+ return ( $wgUser->isSysop() or preg_match('/^'.preg_quote($wgUser->getName(), '/').'\//', $this->mTextform) );
842842 }
843843
844844 /**

Status & tagging log