Jump to content

Wikipedia:Edit filter/Requested

From Wikipedia, the free encyclopedia
    Requested edit filters

    This page can be used to request edit filters, or changes to existing filters. Edit filters are primarily used to address common patterns of harmful editing.

    Private filters should not be discussed in detail. If you wish to discuss creating an LTA filter, or changing an existing one, please instead email details to wikipedia-en-editfilters@lists.wikimedia.org.

    Otherwise, please add a new section at the bottom using the following format:

    == Brief description of filter ==
    *'''Task''': What is the filter supposed to do? To what pages and editors does it apply?
    *'''Reason''': Why is the filter needed?
    *'''Diffs''': Diffs of sample edits/cases. If the diffs are revdelled, consider emailing their contents to the mailing list.
    ~~~~
    

    Please note the following:

    • Edit filters are used primarily to prevent abuse. Contributors are not expected to have read all 200+ policies, guidelines and style pages before editing. Trivial formatting mistakes and edits that at first glance look fine but go against some obscure style guideline or arbitration ruling are not suitable candidates for an edit filter.
    • Filters are applied to all edits on all pages. Problematic changes that apply to a single page are likely not suitable for an edit filter. Page protection may be more appropriate in such cases.
    • Non-essential tasks or those that require access to complex criteria, especially information that the filter does not have access to, may be more appropriate for a bot task or external software.
    • To prevent the creation of pages with certain names, the title blacklist is usually a better way to handle the problem - see MediaWiki talk:Titleblacklist for details.
    • To prevent the addition of problematic external links, please make your request at the spam blacklist.
    • To prevent the registration of accounts with certain names, please make your request at the global title blacklist.
    • To prevent the registration of accounts with certain email addresses, please make your request at the email blacklist.



    AfD closures by anonymous users

    [edit]

    Someone who's wrong on the internet (talk) 14:58, 17 March 2025 (UTC)[reply]

    !(user_type in [named])
    & page_namespace == 4
    & page_title contains "Articles for deletion"
    & added_lines contains "'''Please do not modify it.'''</span>"
    & !(removed_lines contains "'''Please do not modify it.'''</span>")
    I'm using "Please do not modify it" as it's the most consistent part of closure statements, but the style of the div could also be used, assuming there is no hatting template that generates the same style. That last line might be a bit unnecessary as IPs messing with closed discussions isn't something we'd want either, but that's probably another issue. I've futureproofed it by also including temporary accounts. Chaotic Enby (talk · contribs) 15:07, 17 March 2025 (UTC)[reply]
    Is it possible to look for substituded template use? Since it looks like they properly used {{subst:Afd top}}. Nobody (talk) 15:12, 17 March 2025 (UTC)[reply]
    That's the thing, they didn't really use it properly, their close reads The following discussion is an closed debate instead of The following discussion is an archived debate. Chaotic Enby (talk · contribs) 15:18, 17 March 2025 (UTC)[reply]
    Noting that user_type in [ip, temp] should be replaced with !("autoconfirmed" in user_groups). – PharyngealImplosive7 (talk) 16:45, 17 March 2025 (UTC)[reply]
    Why should it be? I thought IPs weren't allowed to close discussions, not non-autoconfirmed users. Chaotic Enby (talk · contribs) 17:02, 17 March 2025 (UTC)[reply]
    Because in your current set-up, this issue may arise: Expressions like page_namespace in [14, 15] may not work as expected. This one will evaluate to true also if page_namespace is 1, 4, or 5. However, I agree my set-up also excludes new users. – PharyngealImplosive7 (talk) 19:53, 17 March 2025 (UTC)[reply]
    I don't think that will be an issue, as the five values user_type can have are ip, temp, named, external, and unknown. None of them are substrings of ip or temp, so the code should work as expected. Chaotic Enby (talk · contribs) 20:58, 17 March 2025 (UTC)[reply]
    FYI, further discussions of this should continue on the edit filter mailing list, as this is looks like an LTA. Codename Noreste (talk) 21:38, 17 March 2025 (UTC)[reply]
    It doesn't matter that this is an LTA. IPs are prohibited from closing AfDs regardless. Someone who's wrong on the internet (talk) 19:49, 18 March 2025 (UTC)[reply]
    Seconded. If an IP wants to start closing AfDs, they need to create an account, period. That is set in stone. BD2412 T 20:27, 18 March 2025 (UTC)[reply]
    Minor change here, but the double ampersands should be single ampersands for the and operators. I'm not sure if the abuse filter can tell the difference but it's better to be safe than sorry. – PharyngealImplosive7 (talk) 02:10, 19 March 2025 (UTC)[reply]
    How soon will this filter be activated? Someone who's wrong on the internet (talk) 00:46, 23 March 2025 (UTC)[reply]
    It's been a while since this filter has been requested and no EFM has reviewed it yet. @Daniel Quinlan: Do you have time to look at this? – PharyngealImplosive7 (talk) 17:52, 2 April 2025 (UTC)[reply]
    @PharyngealImplosive7: Wouldn't this work with !user_type in [named]? EggRoll97 (talk) 02:26, 30 March 2025 (UTC)[reply]
    Yeah, as I suppose that we won't be seeing much of external and unknown, and ip and temp are what we are aiming for (which covers all 5 options). – PharyngealImplosive7 (talk) 04:43, 30 March 2025 (UTC)[reply]
    @EggRoll97: Do you have the time to start testing this code and possibly create a filter? – PharyngealImplosive7 (talk) 18:02, 6 April 2025 (UTC)[reply]
    Apologies for the late response, my time isn't nearly as free as I'd like lately. As for the code, LGTM, other than apparently user_type which wasn't working with any configuration of trying to exempt "named", trying to catch only "ip, temp", or anything else. Someone else is welcome to try a fix for that at a later date, but I've used user_age = 0 as a replacement in the meantime, which should do largely the same thing. Filter created and Monitoring... for now. EggRoll97 (talk) 04:30, 7 April 2025 (UTC)[reply]
    How about user_type == "ip"? Codename Noreste (talk) 03:05, 8 April 2025 (UTC)[reply]
    Updated, since it tests the exact same as user_age. I will note that with temporary accounts coming, this may pose an issue and/or need updating. EggRoll97 (talk) 05:06, 8 April 2025 (UTC)[reply]
    For that, it's equals_to_any(user_type, "ip", "temp"). Codename Noreste (talk) 05:51, 8 April 2025 (UTC)[reply]
    Ah, that would be why. I was trying contains_any, and it wasn't working, so I eventually gave up for the night. EggRoll97 (talk) 21:28, 8 April 2025 (UTC)[reply]
    It's been almost 2 weeks without a single hit. I would wait another week more and disable if there are still no hits. – PharyngealImplosive7 (talk) 17:22, 20 April 2025 (UTC)[reply]
    @EggRoll97: I've analyzed the last 19 hits (all of the hits so far) and have found no FPs. It might be worth it to set the filter to tag/warn or even disallow if there is consensus to do so. – PharyngealImplosive7 (talk) 02:01, 26 April 2025 (UTC)[reply]

    Significance-misleading edits

    [edit]
    • Task: Catch edit summaries usually associated with minor edits, but attached to major edits instead.
    • Reason: It is not allowed to use misleading edit summaries, and patrolling recent changes, I've encountered misleading edit summaries.
    • Diffs: Special:Diff/1282174235 (Way more than this are targeted)
    • Code: sum := "typo|spelling|error|( |^)link( |$)|gramm[ae]r"; significant := edit_delta > 15; significant & (summary rlike sum)

    Faster than Thunder (talk | contributions) 20:34, 24 March 2025 (UTC)[reply]

    I would bump the size up from 10 to maybe 25-50 (although it actually wouldn't be able to catch the example edit even at >10). Another idea might be to check IP edits for "typo" and see if they added any extra spaces (indicative of adding another word, which means they were not fixing typos). Wildfireupdateman :) (talk) 22:42, 24 March 2025 (UTC)[reply]
    For the typical "canned" summaries we can use the regex in 633 (hist · log): "^(?:/\* .* \*/\s?)?(?:Fixed typo|Fixed grammar|Added links|Added content)$". – PharyngealImplosive7 (talk) 23:32, 24 March 2025 (UTC)[reply]
    1. Done.
    2. Not "^...$", to prevent bypassing. Faster than Thunder (talk | contributions) 00:59, 25 March 2025 (UTC)[reply]
    any extra spaces (indicative of adding another word, which means they were not fixing typos). I recently corrected "atleast" to "at least". We need to make sure the added spaces are outside of the word. The code should not match something like "sp, unsourced" where I'm both fixing a typo and removing an unsourced statement in one edit. That would have a high edit delta, but the presence of the major edit keyword "unsourced" in addition to the minor edit keywords means it's a major edit. This could be done by adding ^( and )$ from the other filter. The synonyms at WP:ESL#Spelling, WP:ESL#Typo, WP:ESL#Grammar, and WP:ESL#Links: internal may be useful. Finally, I don't see why the "added content" part of added (links|content) is "usually associated with minor edits". 216.58.25.209 (talk) 06:42, 26 March 2025 (UTC)[reply]
    Filter 970 (hist · log) would have caught this edit, but the edit_delta was only 7. What you're really looking for is edit distance, which unfortunately AbuseFilter does not measure at the byte level. Not saying that 970 can't be improved in some other ways. Suffusion of Yellow (talk) 00:55, 25 March 2025 (UTC)[reply]
    Suggested at phab:T390508. Faster than Thunder (talk | contributions) 18:40, 30 March 2025 (UTC)[reply]

    Block moves between non-talk and talk namespace by new users

    [edit]

    Or vice versa - would be a reasonable addition to the existing move filters and even for experienced users it's rarely a good idea except when cleaning up after an earlier bad move. * Pppery * it has begun... 16:37, 23 April 2025 (UTC)[reply]

    Here's some sample code:
    action == "move" &
    !contains_any(user_groups, "extendedconfirmed", "sysop", "bot") &
    (
       equals_to_any(moved_from_namespace, 1, 3, 5, 7, 9, 11, 13, 15, 101, 119, 127, 711, 829, 1729) &
       equals_to_any(moved_to_namespace, 0, 2, 4, 6, 8, 10, 12, 14, 100, 118, 126, 710, 828, 1728)
    ) |
    (
       equals_to_any(moved_from_namespace, 0, 2, 4, 6, 8, 10, 12, 14, 100, 118, 126, 710, 828, 1728) &
       equals_to_any(moved_to_namespace, 1, 3, 5, 7, 9, 11, 13, 15, 101, 119, 127, 711, 829, 1729)
    )
    
    PharyngealImplosive7 (talk) 17:00, 23 April 2025 (UTC)[reply]
    Simpler code (untested):
    action == "move" &
    !contains_any(user_groups, "extendedconfirmed", "sysop", "bot") &
    (moved_from_namespace % 2) != (moved_to_namespace % 2)
    
    * Pppery * it has begun... 17:15, 23 April 2025 (UTC)[reply]
    Yeah, your code is probably better. I completely forgot that modulo existed here. – PharyngealImplosive7 (talk) 17:33, 23 April 2025 (UTC)[reply]
    Y Done at 1354. The addition is limited to new users initially using (user_editcount < 60 | user_age < 604800). If there aren't any significant false positive issues, we can remove or revise that restriction. Daniel Quinlan (talk) 20:26, 25 April 2025 (UTC)[reply]

    Encyclopedia Metallum for filter 869

    [edit]