Skip to content

Instantly share code, notes, and snippets.

@catrope
Created September 27, 2011 14:11
Show Gist options
  • Save catrope/1245133 to your computer and use it in GitHub Desktop.
Save catrope/1245133 to your computer and use it in GitHub Desktop.
Index: includes/HistoryBlob.php
===================================================================
--- includes/HistoryBlob.php (revision 98216)
+++ includes/HistoryBlob.php (working copy)
@@ -516,13 +516,17 @@
$header = unpack( 'Vofp/Vcsize', substr( $diff, 0, 8 ) );
# Check the checksum if mhash is available
+ # TEMPORARY WMF PATCH -- temporarily disable hash check, since a large number of
+ # revisions appear to have hash mismatches
+ /*
if ( extension_loaded( 'mhash' ) ) {
$ofp = mhash( MHASH_ADLER32, $base );
if ( $ofp !== substr( $diff, 0, 4 ) ) {
wfDebug( __METHOD__. ": incorrect base checksum\n" );
return false;
}
- }
+ }*/
+ #### END WMF PATCH
if ( $header['csize'] != strlen( $base ) ) {
wfDebug( __METHOD__. ": incorrect base length\n" );
return false;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment