r25792 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25791‎ | r25792 | r25793 >
Date:18:13, 11 September 2007
Author:brion
Status:old
Tags:
Comment:
* (bug 11129) Hit spam blacklist on https: links
Modified paths:
  • /trunk/extensions/SpamBlacklist/SpamBlacklist_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SpamBlacklist/SpamBlacklist_body.php
@@ -308,10 +308,10 @@
309309 function buildRegexes( $lines, $batchSize=4096 ) {
310310 # Make regex
311311 # It's faster using the S modifier even though it will usually only be run once
312 - //$regex = 'http://+[a-z0-9_\-.]*(' . implode( '|', $lines ) . ')';
 312+ //$regex = 'https?://+[a-z0-9_\-.]*(' . implode( '|', $lines ) . ')';
313313 //return '/' . str_replace( '/', '\/', preg_replace('|\\\*/|', '/', $regex) ) . '/Si';
314314 $regexes = array();
315 - $regexStart = '/http:\/\/+[a-z0-9_\-.]*(';
 315+ $regexStart = '/https?:\/\/+[a-z0-9_\-.]*(';
316316 $regexEnd = ($batchSize > 0 ) ? ')/Si' : ')/i';
317317 $build = false;
318318 foreach( $lines as $line ) {

Status & tagging log