Last modified: 2012-08-14 11:37:03 UTC
Test case [[Special:BlockIP]]: IP Address or username: any IP address Expiry: whatever you like Reason: ... Other/additional reason: [X] Block anonymous users only [ ] Prevent account creation [ ] Automatically block the last IP address used by this user,... Note that "Prevent account creation" is not marked! When a user tries to register an account via [[Special:CreateAccount]] he get the standard block message even if "Prevent account creation" was not marked.
Fixed in r36916
This doesn't appear to be working the right way; it's finding that permission is not allowed, but then trying to ignore particular reasons why it might not be allowed. Correct fix should be to ensure that the correct result is actually obtained from the permission check in the first place! Note that the error key may have 'autoblocktext' for autoblocks, which would not match this check as written. Reverted for now in r37002
Created attachment 5056 [details] getUserPermissionsErrors Patch Basically according to be debug logs, we are basically checking the block logs twice... Once to work out if they have a block preventing account creation (correct) which is line 727 of SpecialUserlogin.php Then again, when we check that the LocalSettings.php file doesn't have $wgGroupPermissions[*]['createaccount'] = false via getUserPermissionsErrors, which is line 730 of SpecialUserlogin.php, normally this makes sense, but it's blind to the prevent account creation flag so it's no good for us. Simple solution is don't run block check in getUserPermissionsErrors if the action is createaccount.
Keywords: patch, need-review Assigned: brion, as he reverted the previous commit that fixed this issue.
*** This bug has been marked as a duplicate of bug 13611 ***