From cc46cfa8bf15b0fa73296b618c47ac97eecbe692 Mon Sep 17 00:00:00 2001 From: Victor Vasiliev Date: Sun, 3 Feb 2008 18:58:27 +0000 Subject: [PATCH] * (bug 12896) A way to bypass Spam Blacklist --- SpamBlacklist_body.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/SpamBlacklist_body.php b/SpamBlacklist_body.php index b578a388..c49e8e3b 100644 --- a/SpamBlacklist_body.php +++ b/SpamBlacklist_body.php @@ -206,6 +206,7 @@ class SpamBlacklist { $this->title = $title; $this->text = $text; $this->section = $section; + $text = str_replace( '.', '.', $text ); //@bug 12896 $blacklists = $this->getBlacklists(); $whitelists = $this->getWhitelists(); @@ -319,7 +320,7 @@ class SpamBlacklist { */ function validate( $editPage, $text, $section, &$hookError ) { $thisPageName = $editPage->mTitle->getPrefixedDBkey(); - + if( !$this->isLocalSource( $editPage->mTitle ) ) { wfDebugLog( 'SpamBlacklist', "Spam blacklist validator: [[$thisPageName]] not a local blacklist\n" ); return true; @@ -429,8 +430,8 @@ class SpamRegexBatch { function stripLines( $lines ) { return array_filter( array_map( 'trim', - preg_replace( '/#.*$/', '', - $lines ) ) ); + preg_replace( '/#.*$/', '', + $lines ) ) ); } /**