r32822 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r32821‎ | r32822 | r32823 >
Date:18:52, 5 April 2008
Author:btongminh
Status:old
Tags:
Comment:
(bug 12136) Extend allowed characters in JSON callback to ][.'"_A-Za-z0-9
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/api/ApiFormatJson.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiFormatJson.php
@@ -54,7 +54,7 @@
5555 $params = $this->extractRequestParams();
5656 $callback = $params['callback'];
5757 if(!is_null($callback)) {
58 - $prefix = ereg_replace("[^_A-Za-z0-9]", "", $callback ) . "(";
 58+ $prefix = preg_replace("/[^][.\\'\\\"_A-Za-z0-9]/", "", $callback ) . "(";
5959 $suffix = ")";
6060 }
6161
Index: trunk/phase3/RELEASE-NOTES
@@ -193,6 +193,7 @@
194194 * (bug 13606) Added archivename to iiprop
195195 * (bug 11633) Explicitly convert redirect titles to strings due to PHP's
196196 very weak typing on array keys.
 197+* (bug 12136) Extend allowed characters in JSON callback to ][.'"_A-Za-z0-9
197198
198199 === Languages updated in 1.13 ===
199200

Status & tagging log