Commit graph

45 commits

Author SHA1 Message Date
Victor Vasiliev eaa052a959 Fix a warning due to no blacklist source specified.
Blacklist source is needed for list evaluation, but is not
necessary when it the list is parsed.

Bug: 45991
Change-Id: I492a0733d346ab2282715d594918c10428217443
2013-03-11 13:53:13 -04:00
Krenair 12184972ae (bug 41242) Parse the unacceptable new account name/move messages
Caused by Ie78fa258

Also fix blacklist validation message and add a missing whitespace

Change-Id: I8be6bded76a048cba1d8770f795ef240b7b02951
2012-10-20 17:19:21 +01:00
Siebrand Mazeland 16f32456ad Maintenance for TitleBlacklist extension.
* Use Message class.
* Remove trailing whitespace from 'titlewhitelist'.
* stylize.php.
* Update .gitignore.

Change-Id: Ie78fa25816808b0a695cc20630097326fb4cf705
2012-09-18 15:57:57 +02:00
Catrope 2b43eddf7f (bug 38894) Escape the blacklist entry in the new account error
Everything else was already feeding this through htmlspecialchars() as
it should. I can't see how this is directly related to bug 38894 but it
seems to have made it gone away.

Change-Id: I46796a3f09e3e8b281c3029b5e6985f5245231bb
2012-07-31 14:56:22 -07:00
Tim Starling 1d1fe991cc Remove unused global added during testing. 2011-09-22 06:28:55 +00:00
Tim Starling b0b04747eb Fix for r76344: you can't access $wgUser during the CentralAuthAutoCreate hook, because it's the same object that invoked CentralAuth via UserLoadFromSession, after mLoadedItems is set to true but before any data is initialised. The calling code in CentralAuth does permissions checks correctly, by creating a new User object for the anonymous user who is logging in. That's what I've implemented here too.
Most of the changes here are just propagating the anonymous user object through the call stack.
2011-09-22 06:10:45 +00:00
Sam Reed 50b14054c7 Tidy up documentation 2011-08-22 20:37:26 +00:00
Alexandre Emsenhuber 661285c2db Added TitleBlacklist::singleton() to get an instance of the TitleBlacklist instead of having to use $wgTitleBlacklist and call efInitTitleBlacklist() 2011-07-30 15:13:28 +00:00
Brian Wolff 0bf83bc424 follow-up r90737 - also normalize 'createtalk' for good measure.
Note, atm not such a big deal as there are no direct uses of 'createtalk' permission
but good to check for potential future bugs.
2011-06-24 21:36:23 +00:00
Brian Wolff cd08604ddb (bug 28466) Make titleblack list consider 'createpage' action to be same as 'create'.
In r65898, special:upload changed from checking create permission to checking createpage.
Titleblacklist hooks into the userCan create check to determine if the action is a new upload.
(aka not a reupload).

The create vs create(page|talk) permission thing is kind of confusing...
2011-06-24 21:25:50 +00:00
Sam Reed c8d5112717 Documentation, braces, unused globals 2011-03-17 22:20:01 +00:00
Sam Reed d1b3021d6f TitleBlacklist
Fix undefined $user

Documentation, braces
2011-03-14 20:51:13 +00:00
Victor Vasiliev 3219bf6dcb Title blacklist:
* (bug 22141) Introduce a separate user right for overriding title blacklist on account creations only
* Some minor refactorings
2010-11-08 21:55:05 +00:00
Roan Kattouw 01e2dc44e1 Followup r70930: drop wfLoadExtensionMessages(), use makeTitleSafe() instead of newFromText() per r70390 CR 2010-08-12 09:28:30 +00:00
Matěj Grabovský 106f773cf8 TitleBlacklist extension fixes:
* fixed user creation error when user name was invalid title in main namespace;
* fixed error message rendering when creating user with invalid name;
* employed the Html class;
* made code a little more consistent.
2010-08-12 08:38:05 +00:00
Liangent 0991609047 Remove an unused global 2010-06-08 04:34:31 +00:00
Neil Kandalgaonkar 12cdc370b4 this global was lost in change 67347 2010-06-07 18:47:18 +00:00
Alexandre Emsenhuber c52acec944 Big changes to extensions' documentation:
* changed all @addtogroup to @ingroup
* added some @file where needed
* changed some @package/@subpackage to @ingroup
2010-06-06 15:12:22 +00:00
Liangent 0dd93b246d Use the hook CentralAuthAutoCreate to prevent blacklisted user names to be created from global users 2010-06-04 13:36:29 +00:00
Chad Horohoe 85c4e63e2a 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 69251815ff Large commit. Removed 800+ references to no-op wfLoadExtensionMessages() 2010-05-26 22:25:32 +00:00
Siebrand Mazeland 0b5e17ad2a Switch parameters $2 and $3 for 'titleblacklist-forbidden-move' to fit the message ""$2" cannot be moved to "$3", because the title "$3" has been banned from creation." 2009-01-18 14:42:07 +00:00
Victor Vasiliev 4c02593d76 Fix fatal exceptions. 2008-09-15 16:33:40 +00:00
Fran Rogers 36b3f39d20 Block redirects to blacklisted nonexistent titles as well. 2008-09-14 01:44:04 +00:00
Fran Rogers 85d29ce237 self-rv; mixed up diffs 2008-09-14 01:43:21 +00:00
Fran Rogers dc41069d3c Block redirects to blacklisted nonexistent titles as well. 2008-09-14 01:39:00 +00:00
Fran Rogers 97a9812b69 Fixes for problems mentioned in r38967 2008-08-09 01:54:39 +00:00
Brion Vibber 1c2794eb00 Revert r38636 and following for now, doesn't work at present.
Aug  8 23:22:25 srv35 httpd[5547]: PHP Fatal error:  Using $this when not in object context in /home/wikipedia/common/php-1.5/extensions/TitleBlacklist/TitleBlacklist.list.php on line 98 

Fatal error: Call to private method TitleBlacklist::parseBlacklist() from context 'TitleBlacklistHooks' in /Library/WebServer/Documents/trunk/extensions/TitleBlacklist/TitleBlacklist.hooks.php on line 90
2008-08-08 23:26:44 +00:00
Fran Rogers 129796f76b Added username blacklist capabilities to TitleBlacklist. Since the
UsernameBlacklist extension is unmaintained, rather brittle, and only 
supports a single local blacklist, and also on most wikis both 
blacklists will be closely intertwined if not identical, it seems 
logical that TitleBlacklist take over both functions. :)
2008-08-05 15:57:10 +00:00
Ilmari Karonen afac00b084 Remove verifyUpload hook, just check images using the normal userCan hook. This closes a loophole that allowed creation of blacklisted image pages via normal editing. Note that combining this version with MediaWiki revisions prior to r35167 breaks the 'reupload' option and produces uninformative output for blacklisted uploads. 2008-05-22 01:35:48 +00:00
Bryan Tong Minh b89489091c (bug 13803) Add 'reupload' parameter to allow reuploads of existing blacklisted images. 2008-04-20 21:21:16 +00:00
Victor Vasiliev 20d85b52f9 Output pretty message on forbidden uploads 2008-03-15 08:23:54 +00:00
Victor Vasiliev f883ab0abd Create object when necessary 2008-02-01 14:24:59 +00:00
Victor Vasiliev fbbf496af1 * Delay message loading 2008-01-14 14:08:49 +00:00
Siebrand Mazeland d942c258ba (bug 12608) Unifying the spelling of getDBkey() in the extension code. 2008-01-14 10:09:08 +00:00
Niklas Laxström c8bc2845f3 * Delay message loading 2008-01-10 23:16:48 +00:00
Niklas Laxström 648a7b824a * Converted to UTF-8 2007-12-31 10:03:10 +00:00
Brion Vibber d97448856c * Use UTF-8 option on regex matches, not just validation. Fixes case-insensitivity and character class matches for non-ASCII chars.
* Invalidate cached blacklist after save completion of MediaWiki:Titleblacklist rather than during edit filtering. Should help avoid race conditions which would leave you with the old version cached.
* Some minor whitespace & style cleanup
* Some output escaping cleanup
2007-12-29 04:23:57 +00:00
Victor Vasiliev 6899511efe Fix logic 2007-12-27 13:05:16 +00:00
Victor Vasiliev e0c312c5fd Validate MediaWiki:TitleBlacklist and delete it from cache before saving 2007-12-23 09:47:36 +00:00
Victor Vasiliev 6dc375766b TitleBlacklist:
* Add errmsg option
* Some cleanup
2007-12-17 18:38:34 +00:00
Victor Vasiliev 281c040bd2 TitleBlacklist:
Use a better hook (getUserPermissionsErrors)
2007-12-15 06:16:19 +00:00
Victor Vasiliev d6a7b33f91 TitleBlacklist:
* Add TitleBlacklistEntry class
* Add entry attributes
* Temporary remove error message for userCan. Needs better hook
* Changed configuration structure
2007-12-10 19:02:38 +00:00
Victor Vasiliev a5733de0a8 Also fix message name in the code 2007-12-09 13:18:10 +00:00
Victor Vasiliev ef2a6402e5 TitleBlacklist:
* Refactor code
* Filter images with incorrect titles
2007-12-08 21:06:21 +00:00