Last modified: 2013-07-07 18:04:43 UTC
I am trying to prevent untrusted users from adding external links to pages on my wiki. I have created the filter with these conditions: (length(added_links) > 0) & !('trusted_user' in user_groups) and it matches all old edits that I would like to block. During testing it also blocks adding new links to existing pages. But it fails to block creation of a new page containing external links (hit count is not increased). Maybe I am doing something wrong. I have tried the (length(added_links) > 0) alone, and it is the same. I also tried (length(all_links) > 0) with the same result: new users still can create pages containing external links. In the 'examination' all the filter condition versions perfectly match the modifications they should have blocked. I have also tried (new_size > 0) and this one works fine (new page creations are blocked). I have these settings for Emergency Disable feature (effectively turning it off, hopefully): $wgAbuseFilterEmergencyDisableThreshold['default'] = 1; $wgAbuseFilterEmergencyDisableCount['default'] = 100; $wgAbuseFilterEmergencyDisableAge['default'] = 1; I can provide an account to my wiki for someone to test it, if necessary. I had to disable creation of new users and anonymous editing because of spam.
First quick checks show that EditFilterMergedContent (MW 1.21) hook is not triggered on a new page creation, when the added_links filter is the only one active. It is triggered when the new_size filter is active. I will look deeper into it when I have more time.
looks related: Gerrit change #67043
The linked change should have fixed that. If this still occurs on the master of AbuseFilter, please reopen the bug.
It's fixed. Thank you.