Last modified: 2011-07-12 18:47:45 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 T31807, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 29807 - Special:PasswordReset listed on Special:SpecialPages when Authplugin allowPasswordChange() is false
Special:PasswordReset listed on Special:SpecialPages when Authplugin allowPas...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
1.20.x
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-reviewed
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-07-10 23:56 UTC by Rusty Burchfield
Modified: 2011-07-12 18:47 UTC (History)
1 user (show)

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


Attachments
Patch includes/specials/SpecialPasswordReset.php (979 bytes, patch)
2011-07-10 23:56 UTC, Rusty Burchfield
Details

Description Rusty Burchfield 2011-07-10 23:56:39 UTC
Created attachment 8770 [details]
Patch includes/specials/SpecialPasswordReset.php

This check is currently done in userCanExecute, but that function performs other unrelated checks and throws an exception when any occurs.

SpecialPageFactory would call userCanExecute before listing the page, but PasswordReset is (rightfully) not "restricted".  Even if SpecialPageFactory was modified to call userCanExecute in all cases, the current implementation in PasswordReset (and possibly other special pages) will throw an exception.

Therefore, I have implemented the fix by copying the appropriate checks into an isListed override with return false used instead of exceptions.

Patch attached.
Comment 1 Mark A. Hershberger 2011-07-12 18:47:45 UTC
r91985 with some changes.  Thanks!

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


Navigation
Links