Commit graph

22 commits

Author SHA1 Message Date
addshore 28ad8fa659 Remove random space in AbuseFilterViewTestBatch
Change-Id: I2c95e09d7e34ed1d517114324b2ad988ad659dfb
2014-01-25 14:04:18 +01:00
Jackmcbarn 4255e3810b Prevent fatal error in Special:AbuseFilter/test
When an invalid page name is entered in Special:AbuseFilter/test, display
a sane error message rather than throwing a PHP fatal error.

Bug: 55411
Change-Id: I5ec005180c9009f6d14244f3b03221e525cfaed3
2014-01-04 15:28:37 -05:00
Siebrand Mazeland b384fe8d8f Declare class properties, update docs
Based on static code analysis.

Change-Id: Ibafe33b6327ab72429ba961079af40039fb41cbf
2013-11-06 16:12:37 +00:00
Marius Hoch 7705e90506 Hide external changes in Special:AbuseFilter/test
Like on /examine

Change-Id: I760ad45f9858ccf088e5a8a12ddb57770a4a4ff8
2013-05-24 22:24:06 +02:00
Siebrand Mazeland 176227e721 Maintenance for AbuseFilter extension.
* Replace deprecated methods.
* Remove no longer needed function fnmatch().
* Remove superfluous newlines.
* Remove unused and redundant local variables and globals.
* Deglobalization.
* Update documentation.
* Fix incorrect return values or add FIXMEs when in doubt.
* Escape output in a few places where needed.
* Remove unneeded MEDIAWIKI constant checks.
* Fix various JSHint/JSLint issues.

Patch Set 11: Merged https://gerrit.wikimedia.org/r/24701 into
this one per Siebrand's request

Change-Id: I02ba4ce31b6aca5b7324114093f8ece143abc295
2012-10-09 22:26:45 +02:00
John Du Hart 274dcd06a2 Pass one of converting AbuseFilter to use ContextSource
The main AbuseFilter class still needs to be fixed up, but that's a bigger job and I'm out of time
2011-11-16 05:34:24 +00:00
Sam Reed a0a6d18b88 Code cleanup, mainly unused variables 2010-11-04 01:29:10 +00:00
Sam Reed cf800e4c18 Start removing/fixing calls to deprecated methods in WMF used extensions 2010-10-29 15:14:44 +00:00
Jack Phoenix 5e0330c6cc AbuseFilter: coding style tweaks, changed some while loops to foreach (as per http://www.mediawiki.org/wiki/Manual:Coding_conventions#Assignment_expressions) and added __METHOD__ to one DB query 2010-08-19 21:12:09 +00:00
Aryeh Gregor ed5b83e6ac Remove most named character references from output
Recommit of r66254 to trunk.  This was just

find extensions phase3 -iname '*.php' \! -iname '*.i18n.php' \! -iname 'Messages*.php' \! -iname '*_Messages.php' -exec sed -i 's/ /\ /g;s/—/―/g;s/•/•/g;s/á/á/g;s/´/´/g;s/à/à/g;s/α/α/g;s/ä/ä/g;s/ç/ç/g;s/©/©/g;s/↓/↓/g;s/°/°/g;s/é/é/g;s/ê/ê/g;s/ë/ë/g;s/è/è/g;s/€/€/g;s/↔//g;s/…/…/g;s/í/í/g;s/ì/ì/g;s/←/←/g;s/“/“/g;s/·/·/g;s/−/−/g;s/–/–/g;s/ó/ó/g;s/ô/ô/g;s/œ/œ/g;s/ò/ò/g;s/õ/õ/g;s/ö/ö/g;s/£/£/g;s/′/′/g;s/″/″/g;s/»/»/g;s/→/→/g;s/”/”/g;s/Σ/Σ/g;s/×/×/g;s/ú/ú/g;s/↑/↑/g;s/ü/ü/g;s/¥/¥/g' {} +

followed by reading over every single line of the resulting diff and
fixing a whole bunch of false positives.  The reason for this change is
given in <http://lists.wikimedia.org/pipermail/wikitech-l/2010-April/047617.html>.
I cleared it with Tim and Brion on IRC before committing.  It might
cause a few problems, but I tried to be careful; please report any
issues.

I skipped all messages files.  I plan to make a follow-up commit that
alters wfMsgExt() with 'escapenoentities' to sanitize all the entities.
That way, the only messages that will be problems will be ones that
output raw HTML, and we want to get rid of those anyway.

This should get rid of all named entities everywhere except messages.  I
skipped a few things like &nbsp that I noticed in manual inspection,
because they weren't well-formed XML anyway.

Also, to everyone who uses non-breaking spaces when they could use a
normal space, or nothing at all, or CSS padding: I still hate you.  Die.
2010-05-30 17:33:59 +00:00
Siebrand Mazeland b274606879 Update code formatting, run stylize.php, whitespace updates 2010-02-13 14:10:36 +00:00
Jack Phoenix e2a16fe755 AbuseFilter: big commit - coding style & spacing cleanup; also marked SpecialPages' construct() and execute() functions as public and capitalized some SQL keywords 2009-10-07 13:57:06 +00:00
Siebrand Mazeland e454269bfc Proper casing for getDBkey() 2009-05-24 08:33:57 +00:00
Andrew Garrett d00d767207 Allow filtering by page on AbuseFilter batch testing interface 2009-04-23 04:30:17 +00:00
Andrew Garrett 186fc67373 Crackdown on filter evaluation by users unable to modify filters. This is a DoS vector which I thought I'd already plugged. 2009-03-31 15:13:26 +00:00
Alexandre Emsenhuber 80fdcf77ce Fix calls to deprecated functions 2009-03-21 18:47:26 +00:00
Andrew Garrett 057f9f80db Normalise usernames before searching for them in Abuse Filter examine and test interfaces. 2009-02-25 02:33:09 +00:00
Tim Starling c8b0007232 * Break long lines. If I'm going to review this code, I need to be able to read it.
* Write array literals with one item per line. This makes diffs which add or remove items far easier to interpret, and makes merging such changes feasible. And it looks nicer too.
* Use line breaks to show the logical structure of your code. This enhances readability. Bring similar elements in a list into alignment, in order to reveal the differences between those elements at a glance.
* Removed a fun game of spot-the-difference in AbuseFilterHistoryPager::getQueryInfo(). If I want fun games I'll play UFO:AI.
* Moved some oddly placed assignments (in expressions) to their own statements: such assignments reduce readbility.
2009-02-07 09:34:11 +00:00
Andrew Garrett ae7089e23d Make (examine) links on batch test page propagate the filter that was used 2009-01-30 23:24:11 +00:00
Andrew Garrett 769d0a6ea2 Add a nice convenience link to the testing interface to the filter editing interface. 2009-01-30 19:19:03 +00:00
Andrew Garrett 7cbfa0597a Prettify and enhance usability of test and examine views.
* Adopt pretty logos for "Match" and "No Match" for visual distinguishment.
* Allow negatives to be reported as well in 'test' interface.
2009-01-30 00:54:20 +00:00
Andrew Garrett f9c9c07ccf Abuse Filter changes designed for testing filters against real data:
* Add searching and filtering functionality to the existing 'test' interface.
* Add an 'examine' interface designed for testing filters against a previous change, selectable through the search interface in either the 'test' or the 'examine' view.
* Minor enabling change in ChangesList core, to allow subclassing.
2009-01-29 22:44:31 +00:00
Renamed from Views/AbuseFilterViewTest.php (Browse further)