r65401 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65400‎ | r65401 | r65402 >
Date:15:35, 21 April 2010
Author:tstarling
Status:deferred
Tags:
Comment:
MFT r64932, bug 23148: ImageMagick comment escaping. Noted security implications.
Modified paths:
  • /branches/REL1_16/phase3/RELEASE-NOTES (modified) (history)
  • /branches/REL1_16/phase3/includes/media/Bitmap.php (modified) (history)

Diff [purge]

Index: branches/REL1_16/phase3/includes/media/Bitmap.php
@@ -155,7 +155,7 @@
156156 // or ImageMagick may decide your ratio is wrong and slice off
157157 // a pixel.
158158 " -thumbnail " . wfEscapeShellArg( "{$physicalWidth}x{$physicalHeight}!" ) .
159 - " -set comment " . wfEscapeShellArg( "{$descriptionUrl}" ) .
 159+ " -set comment " . wfEscapeShellArg( str_replace( '%', '%%', $descriptionUrl ) ) .
160160 " -depth 8 $sharpen " .
161161 wfEscapeShellArg($dstPath) . " 2>&1";
162162 wfDebug( __METHOD__.": running ImageMagick: $cmd\n");
Property changes on: branches/REL1_16/phase3/includes/media/Bitmap.php
___________________________________________________________________
Name: svn:mergeinfo
163163 + /branches/REL1_15/phase3/includes/media/Bitmap.php:51646
/branches/sqlite/includes/media/Bitmap.php:58211-58321
/branches/wmf-deployment/includes/media/Bitmap.php:53381
/trunk/phase3/includes/media/Bitmap.php:63549,63764,63897-63901,64876,64881,64932
Index: branches/REL1_16/phase3/RELEASE-NOTES
@@ -53,6 +53,8 @@
5454 showed the same text.
5555 * (bug 23115, bug 23124) Fixed various problems with <title> and <h1> elements
5656 in page views and previews when the language converter is enabled.
 57+* (bug 23148) Fixed a local path disclosure vulnerability in ImageMagick image
 58+ scaling, which was introduced in 1.16 beta 1.
5759
5860 === Changes since 1.16 beta 1 ===
5961

Follow-up revisions

RevisionCommit summaryAuthorDate
r65402MFT r64932, bug 23148: ImageMagick comment escaping bugtstarling15:37, 21 April 2010
r65467More rigorous fix for ImageMagick parameter interpretation (bug 23148 etc.) b...tstarling16:24, 23 April 2010
r65681MFT r65467 (and r64935, r64936, r64947 to sync the base): updated fix for bug...tstarling05:33, 30 April 2010
r65682MFT r65467 (and r64935, r64936, r64947 to sync the base): updated fix for bug...tstarling05:37, 30 April 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r64932(bug 23148) Escape % in ImageMagick comments. Patch by Derk-Jan Hartmancatrope12:38, 11 April 2010

Status & tagging log