fix potential xss attack
authorRiver Tarnell <kateturner@users.mediawiki.org>
Thu, 14 Oct 2004 04:50:14 +0000 (04:50 +0000)
committerRiver Tarnell <kateturner@users.mediawiki.org>
Thu, 14 Oct 2004 04:50:14 +0000 (04:50 +0000)
includes/Article.php

index 3204b74..c71338a 100644 (file)
@@ -1867,7 +1867,7 @@ class Article {
                $newcomment = wfMsg( 'revertpage', $s->old_user_text, $from );
                $wgOut->setPagetitle( wfMsg( 'actioncomplete' ) );
                $wgOut->setRobotpolicy( 'noindex,nofollow' );
-               $wgOut->addHTML( '<h2>' . $newcomment . "</h2>\n<hr />\n" );
+               $wgOut->addHTML( '<h2>' . htmlspecialchars( $newcomment ) . "</h2>\n<hr />\n" );
                $this->updateArticle( Article::getRevisionText( $s ), $newcomment, 1, $this->mTitle->userIsWatching(), $bot );
                Article::onArticleEdit( $this->mTitle );
                $wgOut->returnToMain( false );