Last modified: 2006-07-04 17:19:18 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 );
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.
Created attachment 1239 [details] FindSpam.php diff diff as requested :-)
(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.
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."
Is there code elsewhere in the extension that checks for sysop rights?
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.
There's a reason I altered the bug summary.
sorry, was not my intention.
(In reply to comment #8) > sorry, was not my intention. No problem. :)
I've tidied up the permissions check in the extension; see r15325.