From d42eb73e7a0612e6ace42e8e6953663bc3e541c9 Mon Sep 17 00:00:00 2001 From: River Tarnell Date: Mon, 18 Oct 2004 00:15:30 +0000 Subject: [PATCH] security_fix --- includes/Title.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/Title.php b/includes/Title.php index 3924085c5b..dd2fd81e37 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -770,7 +770,7 @@ class Title { if( Namespace::getUser() == $this->mNamespace and preg_match("/\\.(css|js)$/", $this->mTextform ) and !$wgUser->isSysop() - and !preg_match('/^'.preg_quote($wgUser->getName(), '/').'/', $this->mTextform) ) + and !preg_match('/^'.preg_quote($wgUser->getName(), '/').'\//', $this->mTextform) ) { return false; } $ur = $wgUser->getRights(); foreach ( $this->getRestrictions() as $r ) { @@ -837,7 +837,7 @@ class Title { */ function userCanEditCssJsSubpage() { global $wgUser; - return ( $wgUser->isSysop() or preg_match('/^'.preg_quote($wgUser->getName()).'/', $this->mTextform) ); + return ( $wgUser->isSysop() or preg_match('/^'.preg_quote($wgUser->getName(), '/').'\//', $this->mTextform) ); } /** -- 2.20.1