Hey Chris
I was exploring SpamBlaklist Extension. I have some doubts hope you could
clear them.
Is there any place I can get documentation of
Class SpamBlacklist in the file SpamBlacklist_body.php. ?
In function filter what does the following variables represent ?
$title
$text
$section
$editpage
$out
I have understood the following things from the code, please correct me if
I am wrong.
It extracts the edited text, and parse it to find the links. It then
replaces the links which match the whitelist regex, and then checks if
there are some links that match the blacklist regex.
If the check is greater you return the content matched. it already enters
in the debuglog if it finds a match
I guess the bug aims at creating a sql table.
I was thinking of the following fields to log.
Title, Text, User, URLs, IP. I don't understand why you denied it.
On Tue, Feb 26, 2013 at 1:25 AM, Chris Steipp <csteipp(a)wikimedia.org> wrote:
That's an ambitious first bug, Anubhav!
Since this is an extension, it plugs into MediaWiki core using hooks.
So periodically, the core code will run all of the functions
registered for a particular hook, so the extensions can interact with
the logic. In this case, SpamBlacklist has registered
SpamBlacklistHooks::filterMerged to run whenever an editor attempts to
save a page, or SpamBlacklistHooks::filterAPIEditBeforeSave if the
edit came in through the api. So that is where you will want to log.
Although MediaWiki has a logging feature, it sounds like you may want
to add your own logging table (like the AbuseFilter extension). If you
do that, make sure that you're only storing data that you really need,
and is ok with our privacy policy (so no ip addresses!).
Feel free to add me as a reviewer when you submit your code to gerrit.
Chris
On Mon, Feb 25, 2013 at 11:21 AM, Tyler Romeo <tylerromeo(a)gmail.com>
wrote:
Hey,
I don't know much about that, or how much you know, but at the very
least I
can tell you that the bug is in
Extension:SpamBlacklist, which can be
found
can
see from the code, it seems to just use various
Hooks in MediaWiki in
order
to stop editing, e-mailing, etc. if the request
matches a parsed
blacklist
it has.
*--*
*Tyler Romeo*
Stevens Institute of Technology, Class of 2015
Major in Computer Science
www.whizkidztech.com | tylerromeo(a)gmail.com
On Mon, Feb 25, 2013 at 2:17 PM, anubhav agarwal <anubhav914(a)gmail.com
wrote:
> Hi Guys,
>
> I was trying to fix
>
this<https://bugzilla.wikimedia.org/show_bug.cgi?id=1542>buggt;bug. I am a
> newbie to mediawiki and it's a first bug I'm trying to solve,
> so I don't know much.
> I want to know about the spam block list, how does it works, how does
> trigger the action, and its logging mechanism.
> It would be great if some one could help me fix this bug.
>
> Cheers,
> Anubhav
>
>
> Anubhav Agarwal| 4rth Year | Computer Science & Engineering | IIT
Roorkee
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
--
Cheers,
Anubhav
Anubhav Agarwal| 4rth Year | Computer Science & Engineering | IIT Roorkee