Index: trunk/phase3/includes/db/Database.php |
— | — | @@ -2805,7 +2805,7 @@ |
2806 | 2806 | } |
2807 | 2807 | |
2808 | 2808 | function searchForm() { |
2809 | | - global $wgSitename, $wgServer, $wgLang, $wgInputEncoding; |
| 2809 | + global $wgSitename, $wgServer, $wgLang; |
2810 | 2810 | |
2811 | 2811 | $usegoogle = "You can try searching via Google in the meantime."; |
2812 | 2812 | $outofdate = "Note that their indexes of our content may be out of date."; |
— | — | @@ -2819,20 +2819,23 @@ |
2820 | 2820 | |
2821 | 2821 | $search = htmlspecialchars( @$_REQUEST['search'] ); |
2822 | 2822 | |
| 2823 | + $server = htmlspecialchars( $wgServer ); |
| 2824 | + $sitename = htmlspecialchars( $wgSitename ); |
| 2825 | + |
2823 | 2826 | $trygoogle = <<<EOT |
2824 | 2827 | <div style="margin: 1.5em">$usegoogle<br /> |
2825 | 2828 | <small>$outofdate</small></div> |
2826 | 2829 | <!-- SiteSearch Google --> |
2827 | 2830 | <form method="get" action="http://www.google.com/search" id="googlesearch"> |
2828 | | - <input type="hidden" name="domains" value="$wgServer" /> |
| 2831 | + <input type="hidden" name="domains" value="$server" /> |
2829 | 2832 | <input type="hidden" name="num" value="50" /> |
2830 | | - <input type="hidden" name="ie" value="$wgInputEncoding" /> |
2831 | | - <input type="hidden" name="oe" value="$wgInputEncoding" /> |
| 2833 | + <input type="hidden" name="ie" value="UTF-8" /> |
| 2834 | + <input type="hidden" name="oe" value="UTF-8" /> |
2832 | 2835 | |
2833 | 2836 | <input type="text" name="q" size="31" maxlength="255" value="$search" /> |
2834 | 2837 | <input type="submit" name="btnG" value="$googlesearch" /> |
2835 | 2838 | <div> |
2836 | | - <input type="radio" name="sitesearch" id="gwiki" value="$wgServer" checked="checked" /><label for="gwiki">$wgSitename</label> |
| 2839 | + <input type="radio" name="sitesearch" id="gwiki" value="$server" checked="checked" /><label for="gwiki">$sitename</label> |
2837 | 2840 | <input type="radio" name="sitesearch" id="gWWW" value="" /><label for="gWWW">WWW</label> |
2838 | 2841 | </div> |
2839 | 2842 | </form> |
Index: trunk/phase3/includes/Exception.php |
— | — | @@ -236,13 +236,15 @@ |
237 | 237 | header( 'Pragma: nocache' ); |
238 | 238 | } |
239 | 239 | |
240 | | - $title = $this->getPageTitle(); |
| 240 | + $logo = htmlspecialchars( $wgLogo, ENT_QUOTES ); |
| 241 | + $title = htmlspecialchars( $this->getPageTitle() ); |
| 242 | + |
241 | 243 | return "<html> |
242 | 244 | <head> |
243 | 245 | <title>$title</title> |
244 | 246 | </head> |
245 | 247 | <body> |
246 | | - <h1><img src='$wgLogo' style='float:left;margin-right:1em' alt=''/>$title</h1> |
| 248 | + <h1><img src='$logo' style='float:left;margin-right:1em' alt=''/>$title</h1> |
247 | 249 | "; |
248 | 250 | } |
249 | 251 | |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -441,6 +441,7 @@ |
442 | 442 | * (bug 25451) Improved datetime representation in 32 bit php >= 5.2. |
443 | 443 | * Show "skin does not exist error" only when the skin is inputted in the wrong |
444 | 444 | case. |
| 445 | +* (bug 26164) Potential html injection when the database server isn't available |
445 | 446 | |
446 | 447 | === API changes in 1.17 === |
447 | 448 | * (bug 22738) Allow filtering by action type on query=logevent. |