Last modified: 2006-07-04 17:19:18 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 T6402, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 4402 - "Access denied" when using Special:Findspam, even when user has correct permissions
"Access denied" when using Special:Findspam, even when user has correct permi...
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
PC All
: Normal major with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
http://cvs.sourceforge.net/viewcvs.py...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-12-27 20:06 UTC by Florian Steinel
Modified: 2006-07-04 17:19 UTC (History)
0 users

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


Attachments
FindSpam.php diff (501 bytes, patch)
2005-12-27 20:20 UTC, Florian Steinel
Details

Description Florian Steinel 2005-12-27 20:06:24 UTC
Remove addional execution check:
@@ -21,10 +21,10 @@
                global $conf, $wgCanonicalNamespaceNames, $wgLang;
 
                $this->setHeaders();
-               if ( !$this->userCanExecute( $wgUser ) ) {
-                       $this->displayRestrictionError();
-                       return;
-               }
+               //if ( !$this->userCanExecute( $wgUser ) ) {
+               //      $this->displayRestrictionError();
+               //      return;
+               //}
 
                $ip = trim( $wgRequest->getText( 'ip' ) );
                $encQ = htmlspecialchars( $ip );
Comment 1 Ævar Arnfjörð Bjarmason 2005-12-27 20:14:49 UTC
First of all nice that you're finding bugs in MediaWiki (this and bug 4400) but
could you:

1. Send patches in unified diff format (like you're doing) as attachments and
tick the [X] patch flag
2. Explain what the problem is, why does that have to be commented out?


Furthermore if some code doesn't belong it should be removed, not commented out.
Comment 2 Florian Steinel 2005-12-27 20:20:59 UTC
Created attachment 1239 [details]
FindSpam.php diff

diff as requested :-)
Comment 3 Rob Church 2005-12-27 20:21:47 UTC
(In reply to comment #2)
> Created an attachment (id=1239) [edit]
> FindSpam.php diff
> 
> diff as requested :-)

You still didn't explain why this is needed.
Comment 4 Florian Steinel 2005-12-27 20:35:43 UTC
Ok, here is an step by step guide:
1. install FindSpam.php to mediawikis extionsions dir
2. loginto your mediawiki installation, make sure you have the sysop and bureaucrat 
privilege
3. open http://yourhost.priv/mediawiki/Special:FindSpam
4. error message "The action you have requested is limited to users with the "sysop" 
permission assigned."
Comment 5 Rob Church 2005-12-27 20:39:17 UTC
Is there code elsewhere in the extension that checks for sysop rights?
Comment 6 Florian Steinel 2005-12-27 21:16:32 UTC
If i'm reading the include/SpecialPage.php code correctly, the FindSpamPage 
function should be changed to:
SpecialPage::SpecialPage("FindSpam", "sysop", true, "FindSpamPageHTML");
and the execute function renamed to FindSpamPageHTML.
The build in execute function then checks for the necessary rights.
Comment 7 Rob Church 2005-12-27 22:40:00 UTC
There's a reason I altered the bug summary.
Comment 8 Florian Steinel 2005-12-27 22:50:10 UTC
sorry, was not my intention. 
Comment 9 Rob Church 2005-12-27 22:52:38 UTC
(In reply to comment #8)
> sorry, was not my intention. 

No problem. :)
Comment 10 Rob Church 2006-07-04 17:19:18 UTC
I've tidied up the permissions check in the extension; see r15325.

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


Navigation
Links