https://bugzilla.wikimedia.org/show_bug.cgi?id=53501

       Web browser: ---
            Bug ID: 53501
           Summary: AbuseFilter: API action "abusefiltercheckmatch"
                    ignores the "vars" parameter
           Product: MediaWiki extensions
           Version: unspecified
          Hardware: All
               URL: https://pt.wikipedia.org/wiki/Especial:ApiSandbox#acti
                    on=abusefiltercheckmatch&format=json&filter=length(use
                    r_name)%3E0&vars=%7B%22user_name%22%3A%22Foo%22%7D
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: AbuseFilter
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified
   Mobile Platform: ---

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?

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to