From: Brion Vibber Date: Mon, 10 May 2004 18:53:26 +0000 (+0000) Subject: Don't forget to escape things in regexps X-Git-Tag: 1.3.0beta1~96 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/bilan.php?a=commitdiff_plain;h=22225c73d8f00a714d164b8ba9c4185853dd7902;p=lhc%2Fweb%2Fwiklou.git Don't forget to escape things in regexps --- diff --git a/includes/Title.php b/includes/Title.php index c4d49739c2..3bee660a31 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -498,7 +498,7 @@ class Title { if( Namespace::getUser() == $this->mNamespace and preg_match("/\\.(css|js)$/", $this->mTextform ) and !$wgUser->isSysop() - and !preg_match("/^".$wgUser->getName()."/", $this->mTextform) ) + and !preg_match("/^".preg_quote($wgUser->getName(), '/')."/", $this->mTextform) ) { return false; } $ur = $wgUser->getRights(); foreach ( $this->getRestrictions() as $r ) {