escape $wgScript here
authorAaron Schulz <aaron@users.mediawiki.org>
Thu, 19 Feb 2009 19:08:22 +0000 (19:08 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Thu, 19 Feb 2009 19:08:22 +0000 (19:08 +0000)
includes/specials/SpecialListUserRestrictions.php
includes/specials/SpecialRestrictUser.php

index 27b2429..98e7111 100644 (file)
@@ -24,9 +24,10 @@ function wfSpecialListUserRestrictions() {
 class SpecialListUserRestrictionsForm {
        public function getHTML() {
                global $wgRequest, $wgScript, $wgTitle;
+               $action = htmlspecialchars( $wgScript );
                $s = '';
                $s .= Xml::fieldset( wfMsg( 'listuserrestrictions-legend' ) );
-               $s .= "<form action=\"{$wgScript}\">";
+               $s .= "<form action=\"{$action}\">";
                $s .= Xml::hidden( 'title', $wgTitle->getPrefixedDbKey() );
                $s .= Xml::label( wfMsgHtml( 'listuserrestrictions-type' ), 'type' ) . '&nbsp;' .
                        self::typeSelector( 'type', $wgRequest->getVal( 'type' ), 'type' );
index 761e0cd..b946cde 100644 (file)
@@ -37,7 +37,8 @@ function wfSpecialRestrictUser( $par = null ) {
 class RestrictUserForm {
        public static function selectUserForm( $val = null, $error = null ) {
                global $wgScript, $wgTitle;
-               $s  = Xml::fieldset( wfMsg( 'restrictuser-userselect' ) ) . "<form action=\"{$wgScript}\">";
+               $action = htmlspecialchars( $wgScript );
+               $s  = Xml::fieldset( wfMsg( 'restrictuser-userselect' ) ) . "<form action=\"{$action}\">";
                if( $error )
                        $s .= '<p>' . $error . '</p>';
                $s .= Xml::hidden( 'title', $wgTitle->getPrefixedDbKey() );