Page MenuHomePhabricator

namespaces above ID 127 are not shown correctly in the log
Closed, ResolvedPublic

Description

Hey,

I noticed a problem when AbuseFilter triggers on an edit that is performed on a custom namespace. The log shows an entry like this:

<IP> triggered filter 8, performing the action "edit" on :Page title. Actions taken: […]

As you can see, the page is mentioned as “:Page title”, while the actual name is “Custom namespace:Page title”. Going to the details page for the log entry also shows that the namespace is correctly recognized within the action parameters, but the log entry is missing the namespace (and as such also produces an invalid link).

It works as expected with built-in namespaces, the problem just appeared for a custom namespace. Judging by the extension's source, I guess that there is some problem in recognizing the custom namespace, when the filter triggers. After all the log is just using the afl_namespace database field equally for all log entries.

As of now, I can neither take a look at the database to confirm the incorrect afl_namespace content, nor replicate this explicitely. I can however try to do this locally on a test wiki if required.


Version: unspecified
Severity: normal

Details

Reference
bz31397

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 21 2014, 11:47 PM
bzimport set Reference to bz31397.
poke created this task.Oct 5 2011, 10:13 PM

Hey, if you still have this bug or a testcase, can you provide more information, e.g. on your used namespaces?

I'm especially interested in the ID (number) of the custom namespace.

poke added a comment.Jan 30 2014, 6:25 PM

Uh, well, that’s somewhat difficult after all this time :D

I did look through a few thousand filter log entries now but couldn’t find a recent example, so I don’t know if the issue still exists or not.

The namespace where this originally happened is 202.

ok thanks. I have tested it locally with two namespaces at ID 120 and ID 220. For the former it shows correctly in the log, the latter is displayed as described above.

The db shows that for this record the namespace is saved as 127 due the field only "tinyint" wide, which only supports values between -128 and 127, although mediawiki itself uses normal integers.

  • Bug 60622 has been marked as a duplicate of this bug. ***

Change 110881 had a related patch set uploaded by Se4598:
abuse_filter_log table only uses tinyint not int for namespace ID

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

Change 110881 merged by jenkins-bot:
abuse_filter_log table only uses tinyint not int for namespace ID

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

  • Bug 55564 has been marked as a duplicate of this bug. ***