aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/auth
Commit message (Collapse)AuthorAgeFilesLines
* moved normalize_user_or_email_field to auth/tools.py from auth/forms.pyRodney Ewing2013-05-232-27/+51
|
* Switching non-forms back to using normal pass_to_ugettextChristopher Allan Webber2013-04-241-1/+1
|
* Fix-bug-667-Use-lazy_pass_to_ugettext-for-forms.Aditi Mittal2013-04-242-2/+2
|
* Allows you to use your username or email to loginJessica T2013-04-122-4/+12
|
* Use WTForms data field in auth/views.pyHans Lo2013-03-281-6/+6
|
* auth: whitespace cleanup in views.pyHans Lo2013-03-281-3/+3
|
* removed unused import reAndrás Veres-Szentkirályi2013-02-221-1/+0
|
* Also set login_failed in case of form errorsSebastian Spaeth2013-01-211-11/+12
| | | | | | | | | If we send a POST request to the login page which contained form errors (e.g. a too short password), the variable "login_failed" was not set to true. This condition was tested by the test suite however, so we should make sure that login_failed is set even if the form failed to validate. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Restructure ForgotPassword viewSebastian Spaeth2013-01-212-70/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) Remove mongo limitations (no 'or' when querying for either username or email). 2) Lost password function revealed if an user name or email address is registered, which can be considered a data leak. Leaking user names is OK, they are public anyway, but don't reveal lookup success in case the lookup happened by email address. Simply respond: "If you have an account here, we have send you your email"? 3) username and email search was case sensitive. Made username search case insensitive (they are always stored lowercase in the db). Keep email-address search case sensitive for now. This might need further discussion 4) Remove a whole bunch of indention in the style of: if no error: ... if no error: ... if no error: actually do something in the regular case by restructuring the function. 5) Outsource the sanity checking for username and email fields into the validator function. This way, we get automatic case sanity checking and sanitizing for all required fields. 6) Require 5-char password and fix tests Originally, the Change password form required a password between 6-30 chars while the registration and login form did not require anything special. This commit introduces a common minimum limit for all forms which breaks the test suite which uses a 5 char password by default. :-). As 5 chars seem sensible enough to enforce (people should be picking much longer ones anyway), just reduce the limit to 5 chars, thereby making all tests pass. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Move db.sql.models* to db.models*Sebastian Spaeth2013-01-071-1/+1
|
* Mongo removal: Remove the validate=True arg to obj.save()Elrond2012-12-241-1/+1
| | | | | all callers were forced to use validate=True anyway. So remove this useless stuff.
* Remove mongolisms from auth.viewsSebastian Spaeth2012-12-211-22/+13
| | | | Remove find find_one etc and use sqlalchemy syntax
* webob.HTTPFound --> MG.tools.redirectSebastian Spaeth2012-12-211-3/+1
| | | | | | Transition away from webob. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Move DBModel._id -> DBModel.idSebastian Spaeth2012-12-212-6/+6
| | | | | | | | | | | | | | | | | | | | | | | We were refering to model._id in most of the code base as this is what Mongo uses. However, each use of _id required a) fixup of queries: e.g. what we did in our find() and find_one() functions moving all '_id' to 'id'. It also required using AliasFields to make the ._id attribute available. This all means lots of superfluous fixing and transitioning in a SQL world. It will also not work in the long run. Much newer code already refers to the objects by model.id (e.g. in the oauth plugin), which will break with Mongo. So let's be honest, rip out the _id mongoism and live with .id as the one canonical way to address objects. This commit modifies all users and providers of model._id to use model.id instead. This patch works with or without Mongo removed first, but will break Mongo usage (even more than before) I have not bothered to fixup db.mongo.* and db.sql.convert (which converts from Mongo to SQL) Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Fixed OAuth access_token duplicate routeJoar Wandborg2012-10-151-2/+0
| | | | Changed route name to "[...]list_connections"
* Added rudimentary route "mounting" w/ werkzeug routes; fixed auth routesChristopher Allan Webber2012-10-141-32/+18
| | | | | | auth routes fixes: - mounted the auth routes at /auth/ - removed crufty old verification email route
* Fixed 404 page under werkzeug.routingJoar Wandborg2012-10-141-2/+2
| | | | | - Removed ?lang=<langcode> feature due to incompatibility with werkzeug routes in the current state of the architecture.
* Switched most stuff over from RoutesJoar Wandborg2012-10-141-22/+33
| | | | | | | | | | Removed the Routes routing functionality and replaced it with werkzeug.routes. Most views are functional. Known issues: - Translation integration with the request object is not yet figured out. This breaks 404 pages.
* Replaced all request.POST with request.form, ...Joar Wandborg2012-09-291-15/+15
| | | | | - Fixed error handling in OAuth plugin - Changed request.POST file fields to request.files
* Fix problems from pyflakes outputWill Kahn-Greene2012-06-031-1/+0
|
* use _ function on some now untranslatable stringsJakob Kramer2012-04-191-2/+2
|
* set username default server-sideJakob Kramer2012-03-251-1/+2
|
* Merge remote-tracking branch 'derek-moore/bug293_non_ascii_password'Christopher Allan Webber2012-03-121-2/+3
|\
| * Changes for 293. Tests pass, encode UTF8 on password on registration (and ↵Derek Moore2012-03-121-2/+3
| | | | | | | | also for subsequent logins once the user is created) is working.
* | Change user search from .one to .fine_one.Elrond2012-03-121-1/+1
|/ | | | | | | | | | | | | | | | | | When searching for a user by username, there can either be no result or one result. There is a unique constraint on the db. .one in mongokit raises an error for more than one result. But that can't happen anyway. So no problem. .one in sqlalchemy raises an error for more than one, but that's not a problem anyway. It also raises an error for no result. But no result is handled by the code anyway, so no need to raise an exception. .find_one doesn't raise an exception for more than one result (no problem anyway) and just returns None for no result. The later is handled by the code.
* 47: Only lowercase host part of emailElrond2012-02-131-1/+3
| | | | | | | | | According to most documentation it seems that the local part of an email adress is/can be case sensitive. While the host part is not. So we lowercase only the host part of the given adress. See: http://issues.mediagoblin.org/ticket/47
* It's 2012 all up in hereChristopher Allan Webber2012-02-025-5/+5
|
* Dot-Notation: Some random placesElrond2012-01-111-1/+1
|
* Remove fp_changed_success.html, use log in page + notification message insteadJef van Schendel2012-01-012-6/+6
|
* Remove fp_email_sent.html and refs to itJef van Schendel2012-01-011-4/+0
|
* Change forgotten password process: different redirect, added/changed messagesJef van Schendel2011-12-301-8/+16
|
* Isolate JavaScript; add new show_password.js to forgot-password-page as wellJef van Schendel2011-12-291-7/+1
|
* Move verification key generation to viewElrond2011-12-271-0/+1
| | | | | | | | Instead of creating the email verication key on the db model as a default for the field, create it in the registration view. Now all verification key generation is only in auth/views.py!
* Merge jQuery branch, resolve conflictsJef van Schendel2011-12-131-9/+1
|\
| * Add show-password checkbox and make it workJef van Schendel2011-12-021-9/+1
| |
* | Dot-Notation for Users.fp_token_expireElrond2011-12-051-3/+3
| |
* | Dot-Notation for Users.fp_verification_keyElrond2011-12-052-5/+5
| |
* | Dot-Notation for Users.verification_keyElrond2011-12-052-4/+4
| |
* | Dot-Notation for Users.statusElrond2011-12-051-3/+3
| |
* | Dot-Notation for Users.email_verifiedElrond2011-12-051-3/+3
| |
* | Dot-Notation for Users.pw_hashElrond2011-12-051-2/+2
| |
* | Dot-Notation for Users.emailElrond2011-12-052-3/+3
| |
* | Dot-Notation for Users.usernameElrond2011-12-052-7/+7
|/
* Fix redirect to logical pathElrond2011-11-201-1/+1
| | | | | | redirects should in nearly all cases go to a logical path like 'mediagoblin.auth.login' and not to an absolute path like "/auth/login".
* Merge remote branch 'remotes/aaronw/bug614_verification_crash'Elrond2011-11-201-1/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | * remotes/aaronw/bug614_verification_crash: Update english translation file. Reverse order of sanity checks: check email_verified after making sure there's a user in the request. Make sure user isn't already verified before resending verification. Check request.user to determine if user is logged in. Regenerated English .po file to include new string. Display and error and redirect to login page if unauthenticated user tries to access resend_verification. Conflicts: mediagoblin/i18n/en/LC_MESSAGES/mediagoblin.po
| * Reverse order of sanity checks: check email_verified after making sure ↵Aaron Williamson2011-10-031-6/+6
| | | | | | | | there's a user in the request.
| * Make sure user isn't already verified before resending verification.Aaron Williamson2011-10-031-0/+8
| |
| * Fixed conflict in /auth/views.py.Aaron Williamson2011-10-033-4/+5
| |\
| * | Check request.user to determine if user is logged in.Aaron Williamson2011-10-031-1/+1
| | |
| * | Display and error and redirect to login page if unauthenticated user tries ↵Aaron Williamson2011-10-011-2/+11
| | | | | | | | | | | | to access resend_verification.