From c1f21582429065824e0f7891e6943886933039c0 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 7 Apr 2008 23:30:45 +0000 Subject: [PATCH] * (13624) Fix regression with manual thumb= parameter on images Fixes parser test case: * Fuzz testing: image with bogus manual thumbnail [Fixed between 07-Apr-2008 22:04:11, 1.13alpha (r32931) and 07-Apr-2008 23:29:32, 1.13alpha (r32931)] --- RELEASE-NOTES | 1 + includes/Parser.php | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 7a9a306625..42b9d9e5c6 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -66,6 +66,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Make rev_deleted log entries more intelligible. * Logs are grouped under date headings similar to enhanced changes list * (6943) Added PAGESINCATEGORY: magic word +* (13624) Fix regression with manual thumb= parameter on images === Bug fixes in 1.13 === diff --git a/includes/Parser.php b/includes/Parser.php index d19f9dbd7b..536b88cd8c 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -4465,7 +4465,16 @@ class Parser $validated = $handler->validateParam( $paramName, $value ); } else { # Validate internal parameters - $validated = ( $value === false || is_numeric( trim( $value ) ) ); + switch( $paramName ) { + case "manualthumb": + /// @fixme - possibly check validity here? + /// downstream behavior seems odd with missing manual thumbs. + $validated = true; + break; + default: + // Most other things appear to be empty or numeric... + $validated = ( $value === false || is_numeric( trim( $value ) ) ); + } } if ( $validated ) { -- 2.20.1