Commit graph

47 commits

Author SHA1 Message Date
Happy-melon
d3f901b029 Merge in Login rewrite, second time lucky. 2009-09-20 20:28:27 +00:00
Brion Vibber
841014ad91 Revert broken rewrite of login forms:
r55990 "* Totally refactor includes/specials/SpecialUserlogin.php:"
r55991 "Followup to r55990 - Remove debugging hack :("
r55994 "Followup to r55990 - rename method to avoid PHP Strict warnings"
r55997 "Follow-up to r55990, per comments:"

Continued reports of breakage with the new version...
Non-vital changes of this magnitude should probably be worked up on a branch to ensure everything's consistent before pushing them to trunk.
2009-09-08 18:40:05 +00:00
Happy-melon
72431ff920 Followup to r55990 - rename method to avoid PHP Strict warnings 2009-09-07 19:20:20 +00:00
Happy-melon
fca012212f * Totally refactor includes/specials/SpecialUserlogin.php:
** Split backend stuff out into includes/Login.php
** Split account creation and login stuff up, into includes/specials/CreateAccount.php and includes/specials/Userlogin.php.
* Reimplement the special pages as subclasses of SpecialPage
* Use HTMLForm to generate the input forms
** Deprecate and delete includes/templates/Userlogin.php, which is horrible and old :D

This changes the syntax of the UserLoginForm and UserCreateForm hooks, and AuthPlugin::modifyUITemplate; they now receive the SpecialPage subclass rather than the template to work with. Update everything I could find in SVN to accommodate this.
2009-09-07 19:00:49 +00:00
Roan Kattouw
21fd7af97e * API: (bug 17774) API pretends action=query doesn't exist for users without read rights
* Instead of hiding read-restricted modules, throw an error when a user without read rights tries to use them
* Do the same for write modules when $wgEnableWriteAPI is false
* Indicate whether a module needs read or write rights in action=help and action=paraminfo
* BREAKING CHANGE: action=purge now requires write rights and, for anonymous users, a POST request
2009-03-06 13:49:44 +00:00
Roan Kattouw
88f35cdf6e API: Some cleanup
* Aggressively intval() numeric things; addresses the concerns raised on bug 11633
* Use ApiQueryBase::addTitleInfo() everywhere
* Remove a drug-induced-looking line from ApiQueryWatchlist.php
2009-02-27 16:03:01 +00:00
Aryeh Gregor
7091024181 s/existant/existent/ 2009-01-01 02:02:03 +00:00
Roan Kattouw
8504bf43e2 API: Crusade against extract(). Left one extract() call alone in ApiQueryBacklinks.php because I don't have a better alternative for it. 2008-12-17 16:34:01 +00:00
Roan Kattouw
def0843a31 (bug 15479) action=login no longer sets wait parameter when result="Throttled"; regression from r40054 2008-09-04 19:48:48 +00:00
Roan Kattouw
880d5655cb API: Remove the throttle from ApiLogin because
* it's been obsoleted by a similar throttle in core
* it uses time(), which causes problems when you have multiple servers with a significant clock skew between them
2008-08-26 22:18:24 +00:00
Bryan Tong Minh
f830c86e06 Provide some info on which case value was not handled in ApiLogin 2008-08-20 19:56:18 +00:00
Fran Rogers
b63b22fc47 Patch from MaxSem re bug 15162 - handle throttling in the login API 2008-08-16 18:43:02 +00:00
Bryan Tong Minh
04351dd272 Run UserLoginComplete hook from API 2008-05-29 19:23:37 +00:00
Bryan Tong Minh
cf40d9023d (bug 14335) Use proper $wgUser methods instead of using $_SESSION 2008-05-29 18:57:06 +00:00
Alexandre Emsenhuber
087a9f70c5 WARNING: HUGE COMMIT
Doxygen documentation update:
* Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group.
* Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file.
* Removed some empty comments
* Removed some ?>

Added following groups:
* ExternalStorage
* JobQueue
* MaintenanceLanguage

One more thing: there are still a lot of warnings when generating the doc.
2008-05-20 17:13:28 +00:00
Tim Starling
a4eaa89625 * Fix unlogged automatic user creation: run wfLBFactory()->shutdown() unconditionally in api.php. If you want to optimise it, do it in the database backend, since there's no way for the MW core to indicate to the web API that a write query has been performed. The previous code was also wrong in that it didn't commit transactions on foreign connections.
* Fixed debugging code left in (mustBePosted disabled).
2008-05-17 04:26:26 +00:00
Tim Starling
47479fe6cf Handle the new LoginForm::CREATE_BLOCKED return value from authenticateUserData(). 2008-05-17 04:00:26 +00:00
Roan Kattouw
133a033789 API: action=login now returns the correct waiting time in the details property 2008-04-14 13:27:30 +00:00
Siebrand Mazeland
79d5225c0e * remove end of line whitespace
* remove empty lines at end of file
* remove "?>" where still present
2008-04-14 07:45:50 +00:00
Roan Kattouw
471006c9cb API:
* Removing deprecated cmcategory parameter
* Correcting action=login help text
2008-03-16 19:08:30 +00:00
Roan Kattouw
19358606a1 API: Changing all modules' getParamDescription(), getAllowedParams() and getDescription() methods to public. ApiParamInfo needs them, and some versions of PHP threw fatal errors because they were protected. Oddly, other versions didn't (maybe because the caller and the callee have a common ancestor?) 2008-01-28 19:05:26 +00:00
Roan Kattouw
491cc4a320 API: Making a bunch of state-changing modules require POST requests. 2008-01-18 20:43:59 +00:00
Rotem Liss
e1289ecab0 In ApiLogin, init session if necessary. This avoids a blank session ID when no session exists yet. 2007-12-04 08:35:26 +00:00
Rotem Liss
f117c0f7a6 In API action=login, make attribute sessionid work if a session ID doesn't exist yet. 2007-12-03 18:50:53 +00:00
Daniel Cannon
f967e2d2bb API: Provide details message on first failed log-in too (probably where it's needed the most). 2007-11-18 05:46:44 +00:00
Daniel Cannon
e7179279e5 API: Up default wait-time on failed log-in to five seconds. One is too easy to get around. 2007-11-18 05:42:08 +00:00
Brion Vibber
3ca6cf7890 Revert r27151 -- allows session fixation attacks.
Just get a user to visit a URL with the user ID and token you like in the query string (say, in an <img> referenced in a page you convince them to go to or post for their review) and their login session will be replaced with the one you provided.
2007-11-15 04:24:49 +00:00
Roan Kattouw
7d757dff14 API:
* Allow staying logged in through lg* parameters instead of cookies (modified patch by Eddie Roger)
* Removed ApiLogin's sessionID return value, as it doesn't always work and is redundant anyway
2007-11-03 09:57:42 +00:00
Roan Kattouw
647f470625 (bug 11569) API Login should return the cookie prefix 2007-10-08 18:00:17 +00:00
Yuri Astrakhan
1a0e481f85 API: fixed bad login throttling bug (i hope) 2007-08-09 09:53:05 +00:00
Nick Jenkins
130e9f8199 Tweak to prevent strict standards warning: Only variables should be assigned by reference in includes/api/ApiLogin.php on line 154 2007-07-25 01:46:50 +00:00
Yuri Astrakhan
4247af6c2d API: Documentation cleanup 2007-07-06 02:19:56 +00:00
Aryeh Gregor
a15c419b3d Remove ?>'s from files. They're pointless, and just asking for people to mess with the files and add trailing whitespace. (Yes, I looked over every one and reverted those that were bogus. Slash-enter a million times in less worked well enough, although it was a bit mind-numbing.) 2007-06-29 01:19:14 +00:00
Yuri Astrakhan
be1bfe4d5a API bug 10046: incorrect action produces invalid response format 2007-05-28 06:59:19 +00:00
Yuri Astrakhan
1152253310 API: Enabled API login throttling (with amidaniel's help)
fixed memcached-client comments
minor queryRevisions fix
2007-05-27 23:50:24 +00:00
Yuri Astrakhan
cb38c11c84 API: documentation and cleanup. 2007-05-20 23:31:44 +00:00
Nick Jenkins
f9619da3f0 Yet more doc tweaks:
* Add @addtogroup tags to various classes, to try and group conceptually-related classes together.
* Add brief descriptions to various Special pages, thanks to Phil Boswell.
* Moving some docs to be right above the classes they represent, so that they are picked up.
2007-04-20 08:55:14 +00:00
Yuri Astrakhan
8fb74bfd49 API * login module parameter format 2006-10-17 02:11:29 +00:00
Yuri Astrakhan
31775400d8 *API: rewired generator (more work needed)
*API: structure cleanup: module names & parameters
2006-10-03 05:41:55 +00:00
Yuri Astrakhan
04399b2063 * API: added version information to each module (available via api.php?version command) 2006-10-01 21:20:55 +00:00
Yuri Astrakhan
e859600cea * API: pageSet now supports pageids, revised revisions listings, lots of examples. 2006-10-01 20:17:16 +00:00
Yuri Astrakhan
85de1cb74b * Code cleanup per TimStarling's suggestions 2006-10-01 04:38:31 +00:00
Yuri Astrakhan
f97b323e00 * API: result data generation cleanup, minor cleaning 2006-10-01 02:02:13 +00:00
Yuri Astrakhan
5c1ca0fc83 * API: Refactored per brion's suggestions
* API: began query revisions implementation (incomplete)
2006-09-27 05:13:48 +00:00
Yuri Astrakhan
8a7397e8ad * API: Overall query-related cleanup. 2006-09-26 06:37:26 +00:00
Yuri Astrakhan
fcfcf6fdf9 * API-query: normalization
* API: help screen improvements
2006-09-23 23:30:25 +00:00
Yuri Astrakhan
1fc6e9cc86 * API: major refactoring
* API: added login functionality
* API: added several output formats (needs optimization)
2006-09-23 15:57:16 +00:00