r69952 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69951‎ | r69952 | r69953 >
Date:17:41, 26 July 2010
Author:platonides
Status:resolved
Tags:
Comment:
Close the web page when it is disabled.
Fix XSS in filter parameter. Normal setups (with $wgEnableProfileInfo = false) are not affected.
Modified paths:
  • /trunk/phase3/profileinfo.php (modified) (history)

Diff [purge]

Index: trunk/phase3/profileinfo.php
@@ -65,7 +65,8 @@
6666 <?php
6767
6868 if ( !$wgEnableProfileInfo ) {
69 - echo "disabled\n";
 69+ echo "<p>Disabled</p>\n";
 70+ echo "</body></html>";
7071 exit( 1 );
7172 }
7273
@@ -251,8 +252,8 @@
252253 if ( $_expand === false )
253254 $_expand = $expand;
254255
255 - $nfilter = $_filter ? $_filter : $filter;
256 - $nsort = $_sort ? $_sort : $sort;
 256+ $nfilter = $_filter ? htmlspecialchars( $_filter ) : htmlspecialchars( $filter );
 257+ $nsort = $_sort ? htmlspecialchars( $_sort ) : htmlspecialchars( $sort );
257258 $exp = urlencode( implode( ',', array_keys( $_expand ) ) );
258259 return "?filter=$nfilter&amp;sort=$nsort&amp;expand=$exp";
259260 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r69953MFT r69952 + RELEASE-NOTESplatonides17:45, 26 July 2010
r69984* Rewrote r69952, profileinfo.php XSS fix. It was probably safe, but it seeme...tstarling02:39, 27 July 2010
r69989MFT r69952, r69984: profileinfo.php fixes. With release notes.tstarling07:56, 27 July 2010

Status & tagging log