Last modified: 2014-08-02 11:45:12 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 T55501, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 53501 - AbuseFilter: API action "abusefiltercheckmatch" ignores the "vars" parameter
AbuseFilter: API action "abusefiltercheckmatch" ignores the "vars" parameter
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
AbuseFilter (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
https://pt.wikipedia.org/wiki/Especia...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-28 21:20 UTC by Helder
Modified: 2014-08-02 11:45 UTC (History)
3 users (show)

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


Attachments

Description Helder 2013-08-28 21:20:55 UTC
Click in the URL above or follow the following steps:
1. Go to [[pt:Special:Sandbox]]
2. Select the action "abusefiltercheckmatch" in the drop-down menu
3. Type in the filter field: length(user_name)>0
4. Type in the vars field: {"user_name":"Foo"}

After this, click in "Make the request".

== Expected result ==
{
    "abusefiltercheckmatch": {
        "result": true
    }
}

== Actual result ==
{
    "abusefiltercheckmatch": {
        "result": false
    }
}

A similar test with e.g. the filter "user_name===null" and the same JSON in the vars field gives
{
    "abusefiltercheckmatch": {
        "result": true
    }
}

So, it seems AbuseFilter is not setting the variables properly.


Notes:
1. If you don't have the appropriate user rights you'll see something like
{
    "servedby": "mw1141",
    "error": {
        "code": "unknownerror",
        "info": "Unknown error: \"permissiondenied\""
    }
}
2. In case I'm using the wrong syntax to test this, maybe this bug could be reused to request an improved documentation for this API?
Comment 1 Gerrit Notification Bot 2014-07-30 00:59:31 UTC
Change 150456 had a related patch set uploaded by Helder.wiki:
Do not ignore the "vars" parameter on action=abusefiltercheckmatch

https://gerrit.wikimedia.org/r/150456
Comment 2 Gerrit Notification Bot 2014-08-02 11:45:12 UTC
Change 150456 merged by jenkins-bot:
Do not ignore the "vars" parameter on action=abusefiltercheckmatch

https://gerrit.wikimedia.org/r/150456

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


Navigation
Links