From f21fdea9e5d519b75826806f859bd2cba2f76e18 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Tue, 27 Jul 2010 02:39:32 +0000 Subject: [PATCH] * Rewrote r69952, profileinfo.php XSS fix. It was probably safe, but it seemed very confused about the order of escaping operations. The whole MediaWiki framework is available, including wfArrayToCGI(), there's no need for unconventional code. * Renamed makeurl() to something more descriptive and less likely to conflict with extensions. --- profileinfo.php | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/profileinfo.php b/profileinfo.php index 9ef91a4411..3ee5880c59 100644 --- a/profileinfo.php +++ b/profileinfo.php @@ -103,7 +103,7 @@ class profile_point { else $ex = false; if ( !$ex ) { if ( count( $this->children ) ) { - $url = makeurl( false, false, $expand + array( $this->name() => true ) ); + $url = getEscapedProfileUrl( false, false, $expand + array( $this->name() => true ) ); $extet = " [+]"; } else $extet = ''; } else { @@ -112,7 +112,7 @@ class profile_point { if ( $name != $this->name() ) $e += array( $name => $ep ); - $extet = " [–]"; + $extet = " [–]"; } ?> @@ -231,31 +231,35 @@ else - - - - - - - - - + + + + + + + + + $_filter ? $_filter : $filter, + 'sort' => $_sort ? $_sort : $sort, + 'expand' => implode( ',', array_keys( $_expand ) ) + ) ) + ); } $points = array(); -- 2.20.1
NameTime (%)Memory (%)CountCalls/reqms/callkb/callms/reqkb/reqNameTime (%)Memory (%)CountCalls/reqms/callkb/callms/reqkb/req