Commit graph

91 commits

Author SHA1 Message Date
Andrew Garrett 53aea9c0ce AbuseFilter: Resolve bug 18374, bug 28633.
* Store the revision ID associated with a log entry
 if the action is successful.
* Expose this as a diff link in the UI.
* Implicitly hide log entries if their
 corresponding revisions are also hidden.
* Includes scope for expanding to log entries if desired.

Change-Id: Ie2d43dd1bacf14289fdf0492bb22267590ee649d
2012-07-11 10:16:59 -04:00
Sam Reed 8417c901f7 Few more types top flesh out the previous revisions
Change-Id: I1215dcf92f1b64e744c9ab41e0c5c046114dd48c
2012-03-26 16:03:23 +02:00
Sam Reed bea9cb0874 A LOT of function level documentation
Change-Id: I8b591be3c2da7cfb29d3be026772816d14037d37
2012-03-26 16:03:22 +02:00
Roan Kattouw 6c4bd57043 Revert r111217 (unreviewed rev in AbuseFilter) and its dependencies r113585, r113587, r113588, r113589.
All of these revisions are tagged with 'gerritmigration' and will be resubmitted into Gerrit after the Gerrit switchover. See also http://lists.wikimedia.org/pipermail/wikitech-l/2012-March/059124.html
2012-03-21 19:41:11 +00:00
Sam Reed 06e4721b80 Few more types top flesh out the previous revisions 2012-03-11 21:01:29 +00:00
Sam Reed 0c99b2bc15 A LOT of function level documentation 2012-03-11 20:40:04 +00:00
Andrew Garrett 5e4289ce4e AbuseFilter: Resolve bugs 18374, 28633.
* Store the revision ID associated with a log entry if the action is successful.
* Expose this as a diff link in the UI.
* Implicitly hide log entries if their corresponding revisions are also hidden.
* Includes scope for expanding to log entries if desired.
2012-02-10 23:41:05 +00:00
John Du Hart 5e724d1ada require -> require_once per report in IRC by Ciencia_Al_Poder 2011-12-26 19:22:47 +00:00
Victor Vasiliev dd289e2f89 Add comment explaining why we do not need second parameter to preg_quote, per Nikerabbit's comments on r100139 CR. 2011-10-19 18:57:36 +00:00
Victor Vasiliev eca7343487 (part of this commit is in r100135 due to SVN fail)
* (bug 24109) Add regex escaping function to abuse filter

Patch by Jérémie Roquet
2011-10-18 17:57:33 +00:00
Tim Starling da936e9bfe (bug 31379) Don't use the $errcontext parameter of a PHP error handler to get information for error display, this introduces an unexpected, difficult-to-maintain data flow which leads to bugs like the referenced one above. 2011-10-05 23:31:34 +00:00
Sam Reed a9e738f099 More document
Few minor code improvements
2011-08-24 22:11:52 +00:00
Sam Reed 6d548203f7 Parameter and Return Type hints 2011-02-10 17:32:57 +00:00
Sam Reed 6b782a96dd while to foreach
Remove unused variables

Condense css
2011-02-10 17:25:25 +00:00
Sam Reed 6098610527 Another big cull on unused variables and such 2010-10-29 21:55:29 +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
Chad Horohoe 5fce797b18 Revert r66934 (Removing wfLoadExtensionMessages() from everything). I disagree on principle...we branch extensions for this very reason. But people want trunk extensions compatible for several versions back, meh. 2010-05-27 15:56:53 +00:00
Chad Horohoe 3283b90f01 Large commit. Removed 800+ references to no-op wfLoadExtensionMessages() 2010-05-26 22:25:32 +00:00
X! 0884d56521 Adding irlike function: case-insensitive regex 2010-03-28 00:50:51 +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
Andrew Garrett 95f53efdfe Follow-up to r56296, replace htmlspecialchars_decode with html_entity_decode. 2009-09-15 10:25:15 +00:00
Brion Vibber 9bbd4f8bc9 Merge remaining unmerged line of live hacks from r53208 on AbuseFilter 2009-09-14 21:17:09 +00:00
Andrew Garrett 55c83ea218 Add HTML entity decoding to AbuseFilter ccnorm() function 2009-09-14 11:33:44 +00:00
Andrew Garrett 47d513310d Use multibyte-safe string operations in AbuseFilter bug 19333 2009-07-31 11:26:30 +00:00
Andrew Garrett 2eafa9bd66 Bug 19604, backwards-compatibility issues with AbuseFilter count() function. 2009-07-17 16:55:31 +00:00
Andrew Garrett 5cf4cf2d5f Fix Abuse Filter fatals. Resulted from the fact that whenever a regex error was encountered, the error handler was not reset. This error handler was then triggering for any PHP notice, E_STRICT or whatever, causing fatals on Wikimedia 2009-06-18 20:13:52 +00:00
Andrew Garrett db3c0bbe05 Fix regex error handling by returning immediately if error reporting is disabled. 2009-06-17 11:38:31 +00:00
Andrew Garrett 6678b42d8e Remove special-case list handling for contains_any, len, like/in -- breaks backwards-compatibility with old filters. 2009-06-16 14:28:00 +00:00
Andrew Garrett 48bfcc35ee Various code quality fixes for AbuseFilter suggested by Tim Starling in a private email, including bugfixes, memory safeguards, performance improvements, removal of redundant code, consolidation of similar functionaality. 2009-05-26 13:08:15 +00:00
Tim Starling da372fdec0 Reverted r49855, r49656, r49401, r49399, r49397. The language converter cannot be used outside the parser at present without generating a large number of bugs, due to global lifetime state variables, inappropriate $wgParser references, etc. Some refactoring needs to be done before it can be used in this way. 2009-05-26 07:46:29 +00:00
Tim Starling 268d72f43b Code formatting and comments. 2009-05-22 06:42:10 +00:00
Andrew Garrett 7e70a0d197 Merge in r49312 from preferences-work -- non preference related performance improvement to the AbuseFilter parser 2009-04-23 03:37:51 +00:00
Philip Tzou 28202160b8 Add a new function named 'convert()', allow user to convert a string to specified variant in Abuse Filter. With the support of LanguageConverter which updated on r49397. 2009-04-11 10:59:38 +00:00
Victor Vasiliev 128ae5983b Introduce list (non-associated array) support into abuse filter parser. 2009-04-05 17:11:17 +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
Andrew Garrett 7c2a7a2fe0 Support for variable setting with the set_var function, and multiple expressions separated by semicolons (;). In evaluation, the result of the LAST expression will be the return value. 2009-04-01 06:53:18 +00:00
Andrew Garrett ba0b30a054 Add syntax error messages for invalid regexes 2009-04-01 05:56:24 +00:00
Andrew Garrett 3f62707206 String manipulation functions substr, str_replace and strpos for AbuseFilter 2009-04-01 05:05:23 +00:00
Andrew Garrett c597c1915f Add contains_any function, for searching a single haystack for multiple needles. Implemented with FSS with a fallback to a for loop, so it should be really fast. 2009-03-26 02:03:32 +00:00
Andrew Garrett d4d2f4913d Patch by Robert Rohde to prevent empty-string matches of a regex intended to match numbers 2009-03-26 01:30:05 +00:00
Andrew Garrett 20f8b1d16b Properly fix regex munging 2009-03-25 12:43:53 +00:00
Andrew Garrett 1bb05bb402 Fix regex munging by not breaking with regexes with already-escaped /s 2009-03-25 12:15:28 +00:00
Andrew Garrett 5e70316a3a Faster brace short-circuit in Abuse Filter Parser. Patch by Robert Rohde. 2009-03-25 11:48:33 +00:00
Andrew Garrett 86e4081206 Abuse Filter Parser:
* Efficiency -- use /A instead of PREG_OFFSET_CAPTURE and comparing offsets.
* Expand error messages to enhance debugging.
* General code quality
2009-03-25 11:36:38 +00:00
Andrew Garrett fa2ef6a6ca Revert half-done patch from r48802 2009-03-25 10:57:46 +00:00
Andrew Garrett 91d501a4e0 Remove OBSOLETE file for PasswordReset 2009-03-25 10:55:43 +00:00
Andrew Garrett cf6f2899f6 Follow-up to r48674. 2009-03-22 10:34:54 +00:00
Andrew Garrett de32554f33 Fix remote execution vulnerability (exploitable only by admins) 2009-03-22 10:31:26 +00:00