r19197 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r19196‎ | r19197 | r19198 >
Date:05:24, 13 January 2007
Author:brion
Status:old
Tags:
Comment:
* (bug 8375) Reduce spamblacklist's regex size quite a bit; the actual limit seems very hard to predict and may vary based on version, os, architecture, or phase of the moon. Now breaking at 4096 bytes rather than the previous 20000; this makes 12 regexes for the current Wikimedia set.
Modified paths:
  • /trunk/extensions/SpamBlacklist/SpamBlacklist_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SpamBlacklist/SpamBlacklist_body.php
@@ -138,7 +138,7 @@
139139 $regexes = array();
140140 $regexStart = '/http:\/\/+[a-z0-9_\-.]*(';
141141 $regexEnd = ')/Si';
142 - $regexMax = 20000;
 142+ $regexMax = 4096;
143143 $build = false;
144144 foreach( $lines as $line ) {
145145 // FIXME: not very robust size check, but should work. :)