r13601 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r13600‎ | r13601 | r13602 >
Date:04:59, 12 April 2006
Author:robchurch
Status:old
Tags:
Comment:
(bug 5185) Strip out SGML comments before scanning the text for matches so some nutter can't circumvent the lot with a well placed <!-- -->
Modified paths:
  • /trunk/extensions/SpamBlacklist/SpamBlacklist_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SpamBlacklist/SpamBlacklist_body.php
@@ -145,6 +145,10 @@
146146 $regex =& $this->getRegex();
147147
148148 if ( $regex && $regex[0] == '/' ) {
 149+ # Strip SGML comments out of the markup
 150+ # This was being used to circumvent the filter (see bug 5185)
 151+ $text = preg_replace( '/<\!--.*-->/', '', $text );
 152+
149153 # Do the match
150154 wfDebug( "Checking text against regex: $regex\n" );
151155 if ( preg_match( $regex, $text, $matches ) ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r13912(reopened bug 5185) Match on two or more slashes on the protocol to prevent a...robchurch23:18, 28 April 2006

Status & tagging log