Commit graph

141 commits

Author SHA1 Message Date
Ilmari Karonen 0224996e20 fix namespace for file uploads 2009-07-21 16:29:12 +00:00
Andrew Garrett d1d27eede6 Don't trigger AbuseFilter for null edits, bug 19267 2009-07-03 14:01:43 +00:00
Andrew Garrett 569155ed7d (bug 18908) Do not add tags from disabled filters to valid_tags. 2009-06-03 16:05:21 +00:00
Andrew Garrett 3b7d6574e6 (bug 18095) Trigger AbuseFilter on file upload. Presently, the only metadata is SHA1, but we'll see what we can do for other stuff on request. 2009-06-03 15:10:44 +00:00
Andrew Garrett 91f46a5697 (bug 18423) Add link to filtered abuse log on Contributions. Patch by Simon Walker, with minor fixes for double-escaping and wikitext in messages. 2009-04-24 01:53:12 +00:00
Greg Sabino Mullane af7b82c61d Postgres schema updates, per request at ticket 18537. 2009-04-20 22:45:06 +00:00
Victor Vasiliev 258d340fb5 Abuse filter:
* Introduce := operator for setting variables
* Throw an exception when user tries to override built-in variable
* Fix UTF-8 handling in fnmatch() fallback
* Copy three main abuse filters from enwiki to test suite
* Fix update.php integration
2009-04-05 11:47:42 +00:00
Greg Sabino Mullane 1affe9e074 Modified version of patch from Brad Jorsch, updates Postgres schema to match MySQL, bug 18076 2009-03-23 14:18:35 +00:00
Victor Vasiliev 19d1cfe329 Really fix bug 17664 by switching from $editor->textbox1 (which of course contains section text, not page text) to $text in EditFilterMerged hook 2009-03-17 20:44:53 +00:00
Andrew Garrett be7dcd9b3b (bug 17674) Add minor_edit variable to AbuseFilter 2009-03-04 02:04:48 +00:00
Andrew Garrett 03e12503a3 (bug 17664) Handle section-editing correctly by switching from EditFilter to EditFilterMerged.
Also, fix a weird bug where the Abuse Filter was diffing the parsed text, not the wikitext
2009-03-04 01:56:21 +00:00
Andrew Garrett 8f84baea6b Fix fatal 2009-03-01 01:49:34 +00:00
Andrew Garrett ceb5261bb6 AbuseFilter -- precache article object for edits, fix lazy initialisation of IP user objects 2009-02-28 01:10:45 +00:00
Andrew Garrett 92698e95ba Improve AbuseFilter performance by implementing lazy initialisation of computed variables.
This has been done by replacing simple associative arrays with an AbuseFilterVariableHolder, which recognises helper classes called AFComputedVariables.
Computation may occur during the abuse filter analysis, or later when testing and reviewing filters.
2009-02-26 12:15:14 +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 6f91720eac Allow af_public_comments to be wikitext.
Relatedly, add parseInline function to OutputPage, to avoid duplicating the same awful regex in wfMsgExt.
2009-01-31 01:59:13 +00:00
Andrew Garrett 904e6d5c0f Remove duplicate schema update. 2009-01-30 19:02:28 +00:00
Andrew Garrett 5fa5e4367c Fix automatic schema updates, a holdover from moving the code into a hook. 2009-01-30 18:51:37 +00:00
Andrew Garrett 65bc2d1dcf Fix for r46500 -- use the hook so it actually works. 2009-01-29 00:37:53 +00:00
Andrew Garrett cb5eca50fd Add Special:AbuseFilter/test, which allows (trusted for now, due to DoS potential) users to enter a filter, and have it checked against the last 100 RecentChanges items while-u-wait.
Some related cleanup to change tagging in ChangesList.
2009-01-28 23:54:41 +00:00
Andrew Garrett 8a54e6ba00 Branch merge of change-tagging branch with trunk
-- Introduce tagging of individual changes (revisions, logs, and on recentchanges). The tags are customisable, and currently settable by the Abuse Filter and by the TorBlock extension. The tags can be styled on the various pages on which they appear.
-- Introduces a schema change, three new tables (valid_tag, change_tag, and tag_summary).
2009-01-28 19:08:18 +00:00
Andrew Garrett 6a4457d8f5 Rename OLD_TEXT and NEW_TEXT to *_WIKITEXT, and add NEW_HTML and NEW_TEXT parameters, both of which come from the parsed new text -- NEW_TEXT being NEW_HTML stripped of <[^>]*>.
Relatedly, add scrollbars to long variables so they don't take over a bazillion screens.
2009-01-28 01:12:34 +00:00
Andrew Garrett 5861a0fed1 Add OLD_TEXT and NEW_TEXT variables, refactor variable storage, and clean up the AbuseLog interface just a little. 2009-01-27 01:31:42 +00:00
Andrew Garrett 8ddd002c14 Remove dependency on change-tagging being branch-merged to trunk for now, and fix a few miscellaneous related bugs that came up in final testing. 2009-01-23 19:23:44 +00:00
Andrew Garrett 53179c675f Apply changes from change-tagging branch. I will remove all of the stuff actually related to change tagging in a moment, to avoid trunk changes on Wikimedia sites. 2009-01-23 19:23:19 +00:00
Andrew Garrett d5b58edfbb Windows compatibility with PHP parser, fnmatch() function. 2008-10-27 02:24:35 +00:00
Andrew Garrett fe00c5e019 Minor bugs in abuse filter, plus new ALL_LINKS/ADDED_LINKS/REMOVED_LINKS 2008-10-24 08:58:32 +00:00
Andrew Garrett 00b46cef8b Minor fix for last commit, and add DeleteQueue support. 2008-09-18 13:33:39 +00:00
Andrew Garrett 4fd43cdea9 Add basic functionality to delete filters (not really a deletion, just moved to another list) 2008-09-05 14:27:18 +00:00
Andrew Garrett 15bc04b725 Fix minor bug 2008-08-31 06:39:04 +00:00
Andrew Garrett 16909a2c42 Fix two memory leaks in native parser. Now has no memory leaks :-) 2008-08-07 13:53:18 +00:00
Andrew Garrett 34a4bbe10a Abuse filter updates:
* Allow matching on the changes made in an edit (added/removed lines, etc)
* Improve display of variables in details view - standardise the table size, add white-space: pre, font-family: monospace.
* Improve modifiers: add htmlencode/htmldecode/urlencode/urldecode.
* Add 'abuse filter tools', currently consisting of a testing ground for the modifiers. In future, may include facilities for testing filters against user contributions, recent changes, or other sources.
2008-07-17 13:40:45 +00:00
Andrew Garrett b142b81dd7 Include size delta in vars for editing 2008-07-15 08:46:17 +00:00
Andrew Garrett c91433cbc0 Fix fatal error on account creation 2008-06-30 10:40:35 +00:00
Andrew Garrett 44da7a3dce Change primary key of abuse_filter_action from afa_filter to afa_filter,afa_consequence 2008-06-27 09:49:26 +00:00
Alexandre Emsenhuber a180d6aba2 Fix some E_NOTICE 2008-06-27 09:26:54 +00:00
Andrew Garrett a4908befe4 === instead of == for comparing with true 2008-06-27 09:18:45 +00:00
Andrew Garrett 08890163af Handle case where no filters were matched 2008-06-27 08:34:34 +00:00
Andrew Garrett 1c69a9c569 Remove some ugly debugging code 2008-06-27 08:19:49 +00:00
Andrew Garrett 0879428747 Pass a title instead of a user object. For some reason we were passing a user object into the hook :/ 2008-06-27 08:16:11 +00:00
Andrew Garrett 1f5f95131d Add AbuseFilter extension 2008-06-27 06:18:51 +00:00