User "Awjrichards" posted a comment on MediaWiki.r98202.
Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/98202#c23955
Commit summary:
More refactoring work for the gateway adapters, mostly surrounding the special
page itself.
Comment:
<pre>
+ global $wgRequest, $wgOut, $wgExtensionAssetsPath;
+ $CSSVersion = $this->adapter->getGlobal( 'CSSVersion' );
+
$wgOut->allowClickjacking();
$wgOut->addExtensionStyle(
$wgExtensionAssetsPath .
'/DonationInterface/gateway_forms/css/gateway.css?284' .
- $wgPayFlowProGatewayCSSVersion );
+ $CSSVersion );
</pre>
This should be converted to rely on ResourceLoader, then we wont need to futz
with $CSSVersion.
<pre>
$wgOut->addScript( Skin::makeVariablesScript( $scriptVars ) );
</pre>
Also should be converted to use ResourceLoader.
<pre>
+ $ret = $wgDonationInterfacePaypalURL . "/" .
$this->postdata['language'] . "?gateway=paypal&" . http_build_query(
$this->postdata );
</pre>
If I'm not mistaken, this is sending the entire data object to PayPal. We
should probably only send the necessary fields/values.
When displaying output, like in displayResultsForDebug(), it is best to rely on
MW's HTML or XML class for formatting - this will ensure proper escaping of
values. (see
http://www.mediawiki.org/wiki/Security_for_developers#Output_.28API.2C_CSS.2C_JavaScript.2C_HTML.2C_XML.2C_etc..29)
_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview