From: Tim Starling Date: Sat, 20 Dec 2008 08:13:21 +0000 (+0000) Subject: Fixes as per bug 15895 comment 7. X-Git-Tag: 1.31.0-rc.0~43864 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dcompta/operations/modifier.php?a=commitdiff_plain;h=91f9860764bb6b72d015095fa20c3ae2ad397a45;p=lhc%2Fweb%2Fwiklou.git Fixes as per bug 15895 comment 7. --- diff --git a/includes/IEContentAnalyzer.php b/includes/IEContentAnalyzer.php index 59abc6a68a..df4d36f052 100644 --- a/includes/IEContentAnalyzer.php +++ b/includes/IEContentAnalyzer.php @@ -569,8 +569,9 @@ class IEContentAnalyzer { $chunk3 = substr( $chunk, 0, 3 ); $chunk4 = substr( $chunk, 0, 4 ); $chunk5 = substr( $chunk, 0, 5 ); + $chunk5uc = strtoupper( $chunk5 ); $chunk8 = substr( $chunk, 0, 8 ); - if ( $chunk5 == 'GIF87' || $chunk5 == 'GIF89' ) { + if ( $chunk5uc == 'GIF87' || $chunk5uc == 'GIF89' ) { return 'image/gif'; } if ( $chunk2 == "\xff\xd8" ) { @@ -579,7 +580,7 @@ class IEContentAnalyzer { if ( $chunk2 == 'BM' && substr( $chunk, 6, 2 ) == "\000\000" - && substr( $chunk, 8, 2 ) != "\000\000" ) + && substr( $chunk, 8, 2 ) == "\000\000" ) { return 'image/bmp'; // another non-standard MIME } @@ -800,7 +801,7 @@ class IEContentAnalyzer { } // BinHex - if ( !strncasecmp( $remainder, $binhexMagic, strlen( $binhexMagic ) ) ) { + if ( !strncmp( $remainder, $binhexMagic, strlen( $binhexMagic ) ) ) { $found['binhex'] = true; } }