Last modified: 2012-11-04 17:38:54 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T36385, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 34385 - $wgProxyList blocking broken since 1.18
$wgProxyList blocking broken since 1.18
Status: RESOLVED DUPLICATE of bug 35303
Product: MediaWiki
Classification: Unclassified
User blocking (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-13 23:52 UTC by Brion Vibber
Modified: 2012-11-04 17:38 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Brion Vibber 2012-02-13 23:52:03 UTC
In User::getBlockedStatus(), proxy detection sets $this->mBlockedReason and $this->mBlockedby but doesn't set $this->mBlock, so getBlock/isBlocked don't see it.

Should probably synthesize a Block object here...?
Comment 1 Chris Davis 2012-09-12 08:45:11 UTC
This may not be the best way to fix it, but I've found that modifying ./includes/specials/SpecialUserlogin.php to include a check for $wgUser->blockedBy() is able to get things working again.  

The specific problem I was running into was that $wgProxyList seems to allow banned IPs to create accounts, but prevents them from editing.  By setting up a bannedips.php file as specified on http://www.mediawiki.org/wiki/Manual:Combating_spam, I was able to prevent spam edits, but my Recent Changes were becoming bloated with a lot of bogus accounts.

Old:
if ( !$wgUser->isAllowed( 'createaccount' ) ) {
        $wgOut->permissionRequired( 'createaccount' );
        return false;
} elseif ( $wgUser->isBlockedFromCreateAccount() ) {
        $this->userBlockedMessage();
        return false;
}


New:
if ( $wgUser->blockedBy()){
        $this->userBlockedMessage();
        return false;
} elseif ( !$wgUser->isAllowed( 'createaccount' ) ) {
        $wgOut->permissionRequired( 'createaccount' );
        return false;
} elseif ( $wgUser->isBlockedFromCreateAccount() ) {
        $this->userBlockedMessage();
        return false;
}
Comment 2 Andre Klapper 2012-11-04 17:38:54 UTC
This was fixed in bug 35303 / https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=commitdiff;h=eb5e031f310ddd8ba871219dd7fa939a904ea638

*** This bug has been marked as a duplicate of bug 35303 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links