Správa filtrů zneužití

Rozdíly mezi verzemi

PoložkaVerze z 10. 12. 2017, 15:09 od uživatele Martin UrbanecVerze z 28. 10. 2018, 23:49 od uživatele Martin Urbanec
Základní informace
Poznámky:
"confirmed" in user_groups => "autoconfirmed" in user_rights, ať filtr obchází i stewardi, globální revertéři apod. --MU
Autoconfirmed => confirmed --MU
Autoconfirmed => confirmed --MU


úprava (počet podmínek) -- Matěj S.
úprava (počet podmínek) -- Matěj S.


malá úprava -- Matěj S.
malá úprava -- Matěj S.


V naprosté většině se jedná o nevhodnou akci, zapínám do režimu s varováním -- Tchoř
V naprosté většině se jedná o nevhodnou akci, zapínám do režimu s varováním -- Tchoř


Tchoř importoval z en:  
Tchoř importoval z en:  
http://en.wikipedia.org/wiki/Special:AbuseFilter/61
http://en.wikipedia.org/wiki/Special:AbuseFilter/61
-------
-------
"<ref|</ref" split for clarity
"<ref|</ref" split for clarity


Appears to get more and better hits on referenced info now too. Apparently, previous version wasn't working properly. --Mgm
Appears to get more and better hits on referenced info now too. Apparently, previous version wasn't working properly. --Mgm


Switched on. - It Is Me Here
Switched on. - It Is Me Here
Tagging instead of disallowing, there are plenty of good reasons to remove references. -- Mgm
Tagging instead of disallowing, there are plenty of good reasons to remove references. -- Mgm
Oh, is this for all references? Wasn't there one regarding removing a {{Reflist}} template? - It Is Me Here
Oh, is this for all references? Wasn't there one regarding removing a {{Reflist}} template? - It Is Me Here
   That one (filter 79) was a test, and it doesn't appear to be working properly. It hasn't caught anything for at least 24 hours. - Mgm
   That one (filter 79) was a test, and it doesn't appear to be working properly. It hasn't caught anything for at least 24 hours. - Mgm
removed private flag, unnecessary --  Zzuuzz
removed private flag, unnecessary --  Zzuuzz
Updated format that should also catch named references and avoid the old reference grouping tag. --Mgm
Updated format that should also catch named references and avoid the old reference grouping tag. --Mgm
Filter 79 now working properly, removing line that specifies reflist. Working on better regex to avoid <references/> being hit with this one --Mgm
Filter 79 now working properly, removing line that specifies reflist. Working on better regex to avoid <references/> being hit with this one --Mgm


Changing to edit_delta <= -1000 from >= -1000; seems like this was the intent. >= and <= comparisons are based on actual value, not absolute value. Correct me if this was the intent. Also, we are getting some false positives on this, see http://en.wikipedia.org/w/index.php?title=Interstate_5_in_Washington&diff=279452062&oldid=278504317 - Hersfold
Changing to edit_delta <= -1000 from >= -1000; seems like this was the intent. >= and <= comparisons are based on actual value, not absolute value. Correct me if this was the intent. Also, we are getting some false positives on this, see http://en.wikipedia.org/w/index.php?title=Interstate_5_in_Washington&diff=279452062&oldid=278504317 - Hersfold


>= is correct. It is supposed to exclude large removals from being evaluated since they're covered by blanking filters.  It was an error in the regex. Instead of allowing for <ref name="whatever">, the regex allowed choosing between <ref> and <ref name>, the last of which obviously didn't work. -- Mgm
>= is correct. It is supposed to exclude large removals from being evaluated since they're covered by blanking filters.  It was an error in the regex. Instead of allowing for <ref name="whatever">, the regex allowed choosing between <ref> and <ref name>, the last of which obviously didn't work. -- Mgm


added note in filter to avoid confusion --Mgm
added note in filter to avoid confusion --Mgm


Altered regex to treat refs as whole blocks, to avoid situation where a duplicate ref is changed to a named ref (<ref>Blah</ref> --> <ref name=foo/>).  Now won't catch users removing one end of a ref though.  Might have ec'd with cmt above, but can't tell in this wierd system :D --HM
Altered regex to treat refs as whole blocks, to avoid situation where a duplicate ref is changed to a named ref (<ref>Blah</ref> --> <ref name=foo/>).  Now won't catch users removing one end of a ref though.  Might have ec'd with cmt above, but can't tell in this wierd system :D --HM




Okay... I THINK this is finally a correct regex that:
Okay... I THINK this is finally a correct regex that:


   1) grabs <ref> ... </ref> as entire blocks
   1) grabs <ref> ... </ref> as entire blocks
   2) grabs <ref name="foo"/>
   2) grabs <ref name="foo"/>
   3) ignores <references/>
   3) ignores <references/>
   4) allows newline breaks between <ref> and </ref> tags.
   4) allows newline breaks between <ref> and </ref> tags.
   5) grabs only consecutive <ref>, </ref> pairs (as opposed to jumping from the first <ref> to the last </ref>).
   5) grabs only consecutive <ref>, </ref> pairs (as opposed to jumping from the first <ref> to the last </ref>).


-DF
-DF


Restored original version, added exclusions for naming references and removing closing tags of named references. --Mgm
Restored original version, added exclusions for naming references and removing closing tags of named references. --Mgm


Added comments for clarity --Mgm
Added comments for clarity --Mgm


Too many false positives, setting to log only. --Conti
Too many false positives, setting to log only. --Conti


From Coppertwig:
From Coppertwig:
A more exact count might be obtained by defining a ref-opening as either "<ref>" or "<ref name" and a ref-closing as either "</ref>" or "ref name ... />".  (With the named reference, the same tag will sometimes count as both an opening and a closing.)  The code might look something like this (assuming rcount expects regular expressions):
A more exact count might be obtained by defining a ref-opening as either "<ref>" or "<ref name" and a ref-closing as either "</ref>" or "ref name ... />".  (With the named reference, the same tag will sometimes count as both an opening and a closing.)  The code might look something like this (assuming rcount expects regular expressions):


/* count of removed ref-openings exceeds count of added ref-openings, or count of removed ref-closings exceeds count of added ref-closings; named refs with slashes count as both openings and closings. */ & (rcount("(<ref>|<ref\sname)",removed_lines) > rcount("(<ref>|<ref\sname)",added_lines) | rcount("(</ref>|<ref\sname[^>/]*/>)",removed_lines) > rcount("(</ref>|<ref\sname[^>/]*/>)",added_lines)
/* count of removed ref-openings exceeds count of added ref-openings, or count of removed ref-closings exceeds count of added ref-closings; named refs with slashes count as both openings and closings. */ & (rcount("(<ref>|<ref\sname)",removed_lines) > rcount("(<ref>|<ref\sname)",added_lines) | rcount("(</ref>|<ref\sname[^>/]*/>)",removed_lines) > rcount("(</ref>|<ref\sname[^>/]*/>)",added_lines)


Adjusted delta to -3000 due to a sock removing references that has been missed due to the total removed content. Ref [[User:Ryulong/Sandbox#Ref_removing_vandal]] - Shirik 24 Jan
Adjusted delta to -3000 due to a sock removing references that has been missed due to the total removed content. Ref [[User:Ryulong/Sandbox#Ref_removing_vandal]] - Shirik 24 Jan


I replaced \sname with \s(name|group). - Ruslik
I replaced \sname with \s(name|group). - Ruslik


Something 'wrong' here .. it catches also '<ref></ref>' (i.e., empty tags, as included in the article creation wizard).  They should be excluded.
Something 'wrong' here .. it catches also '<ref></ref>' (i.e., empty tags, as included in the article creation wizard).  They should be excluded.
Podmínky filtru
Podmínky:
! "confirmed" in user_groups
! "autoconfirmed" in user_rights
/* this edit_delta ignores large blankings that are treated by another filter */
/* this edit_delta ignores large blankings that are treated by another filter */
& (
& (
   edit_delta >= -3000
   edit_delta >= -3000
   & (
   & (
     article_namespace == 0
     article_namespace == 0
/* No added lines usually mean a blanking which is dealt with by other filter */
/* No added lines usually mean a blanking which is dealt with by other filter */
     & (
     & (
       length(added_lines) != 0
       length(added_lines) != 0
       & (
       & (
         ! lcase(new_wikitext) rlike "^#\s*(přesměruj|redirect)\s*\[\["
         ! lcase(new_wikitext) rlike "^#\s*(přesměruj|redirect)\s*\[\["
         & (
         & (
/* Counts of more reference tags are removed than added */
/* Counts of more reference tags are removed than added */
           rcount("<ref\b", removed_lines) > rcount("<ref\b", added_lines)
           rcount("<ref\b", removed_lines) > rcount("<ref\b", added_lines)
/* nepočítej odstranění reference Wikipedií */
/* nepočítej odstranění reference Wikipedií */
           &! (
           &! (
             count("wikipedia.org", removed_lines) > count("wikipedia.org", added_lines)
             count("wikipedia.org", removed_lines) > count("wikipedia.org", added_lines)
           )
           )
         )
         )
       )
       )
     )
     )
   )
   )
)
)