* (bug 12896) A way to bypass Spam Blacklist

This commit is contained in:
Victor Vasiliev 2008-02-03 18:58:27 +00:00
parent dc8b6497aa
commit cc46cfa8bf

View file

@ -206,6 +206,7 @@ class SpamBlacklist {
$this->title = $title; $this->title = $title;
$this->text = $text; $this->text = $text;
$this->section = $section; $this->section = $section;
$text = str_replace( '', '.', $text ); //@bug 12896
$blacklists = $this->getBlacklists(); $blacklists = $this->getBlacklists();
$whitelists = $this->getWhitelists(); $whitelists = $this->getWhitelists();
@ -319,7 +320,7 @@ class SpamBlacklist {
*/ */
function validate( $editPage, $text, $section, &$hookError ) { function validate( $editPage, $text, $section, &$hookError ) {
$thisPageName = $editPage->mTitle->getPrefixedDBkey(); $thisPageName = $editPage->mTitle->getPrefixedDBkey();
if( !$this->isLocalSource( $editPage->mTitle ) ) { if( !$this->isLocalSource( $editPage->mTitle ) ) {
wfDebugLog( 'SpamBlacklist', "Spam blacklist validator: [[$thisPageName]] not a local blacklist\n" ); wfDebugLog( 'SpamBlacklist', "Spam blacklist validator: [[$thisPageName]] not a local blacklist\n" );
return true; return true;
@ -429,8 +430,8 @@ class SpamRegexBatch {
function stripLines( $lines ) { function stripLines( $lines ) {
return array_filter( return array_filter(
array_map( 'trim', array_map( 'trim',
preg_replace( '/#.*$/', '', preg_replace( '/#.*$/', '',
$lines ) ) ); $lines ) ) );
} }
/** /**