From 22225c73d8f00a714d164b8ba9c4185853dd7902 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 10 May 2004 18:53:26 +0000 Subject: [PATCH] Don't forget to escape things in regexps --- includes/Title.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ) { -- 2.20.1