r13912 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r13911‎ | r13912 | r13913 >
Date:23:18, 28 April 2006
Author:robchurch
Status:old
Tags:
Comment:
(reopened bug 5185) Match on two or more slashes on the protocol to prevent another blacklist workaround
Modified paths:
  • /trunk/extensions/SpamBlacklist/SpamBlacklist_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SpamBlacklist/SpamBlacklist_body.php
@@ -106,7 +106,7 @@
107107 } else {
108108 # Make regex
109109 # It's faster using the S modifier even though it will usually only be run once
110 - $this->regex = 'http://[a-z0-9_\-.]*(' . implode( '|', $lines ) . ')';
 110+ $this->regex = 'http://+[a-z0-9_\-.]*(' . implode( '|', $lines ) . ')';
111111 $this->regex = '/' . str_replace( '/', '\/', preg_replace('|\\\*/|', '/', $this->regex) ) . '/Si';
112112 }
113113 $wgMemc->set( "spam_blacklist_regex", $this->regex, $this->expiryTime );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r13601(bug 5185) Strip out SGML comments before scanning the text for matches so so...robchurch04:59, 12 April 2006

Status & tagging log