r32148 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r32147‎ | r32148 | r32149 >
Date:00:34, 19 March 2008
Author:brion
Status:old
Tags:
Comment:
* (bug 9403) Sanitize newlines from search term input
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/SpecialSearch.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialSearch.php
@@ -30,7 +30,7 @@
3131 function wfSpecialSearch( $par = '' ) {
3232 global $wgRequest, $wgUser;
3333
34 - $search = $wgRequest->getText( 'search', $par );
 34+ $search = str_replace( "\n", " ", $wgRequest->getText( 'search', $par ) );
3535 $searchPage = new SpecialSearch( $wgRequest, $wgUser );
3636 if( $wgRequest->getVal( 'fulltext' ) ||
3737 !is_null( $wgRequest->getVal( 'offset' ) ) ||
Index: trunk/phase3/RELEASE-NOTES
@@ -104,6 +104,7 @@
105105 * (bug 11563) Deprecated SearchMySQL4 class; merged code to SearchMySQL
106106 * (bug 12801) Fix link in subtitle message in AJAX search
107107 * (bug 13428) Fix regression in protection form layout HTML validity
 108+* (bug 9403) Sanitize newlines from search term input
108109
109110
110111 === API changes in 1.13 ===

Status & tagging log