Nick Daly
c5ceae5819
Properly use bcrypt:
...
- Don't crypto: use a library provided time-independent comparison.
- Document details about max password length and other caveats.
2014-03-02 15:36:22 -06:00
James Valleroy
030675b900
Remove old cfg.users_dir. Remove old UserStore class.
2013-11-20 21:29:28 -05:00
James Valleroy
880e9bd76a
Set default paths in auth_page module to begin with server_dir.
2013-11-16 13:21:27 -05:00
James Valleroy
2f7b56e6a9
No need to have avoid timing side-channel attack in user_add. We're just going to tell you if the user already exists anyway.
2013-11-11 07:34:27 -06:00
James Valleroy
96edae33ed
Remove time.clock line in auth module. It wasn't being used.
2013-11-11 07:34:27 -06:00
James Valleroy
292bedebe6
Use POST instead of GET for forms. It seems like it's working now.
2013-11-11 07:34:27 -06:00
James Valleroy
3a696e0bb9
Fix check for already existing username in add_user. Add documentation of process for storing and validating hashed passwords.
2013-11-11 07:31:53 -06:00
James Valleroy
f7ad1089a5
Update tests for auth module, and fix some bugs discovered in auth module.
2013-11-11 07:31:53 -06:00
James Valleroy
2abe8559e5
Add add_user function to auth module.
2013-11-11 07:31:53 -06:00
James Valleroy
4a9177a257
Use bcrypt for login form. Add tests to check that salts and hashes are random, and check handling of invalid passwords or salts.
2013-11-11 07:28:26 -06:00
Nick Daly
95fbf9527f
Merge pull request #50 from jvalleroy/fix-redirects
...
Fix redirects
2013-11-10 19:34:34 -08:00
James Valleroy
7b3a2fbe2c
Remove completed TODO.
2013-11-02 17:34:17 +00:00
James Valleroy
504a195708
Remove commit line from UserStore. This function was not defined in withsqlite, and also unnecessary since autocommit is on.
2013-11-02 17:34:17 +00:00
James Valleroy
77948f0e96
prepend server_dir to remaining redirects
2013-11-02 11:34:23 +00:00
James Valleroy
38d3e84961
first_boot needs to move up a folder to reach router. Prepend server_dir to redirects in router, auth, and auth_page.
2013-11-02 11:25:37 +00:00
Nick Daly
f69549c480
Merge pull request #27 from petterreinholdtsen/forms-radio-buttons
...
Add support for radio buttons.
2013-09-28 10:46:32 -07:00
Petter Reinholdtsen
6630a8f3d5
Make sure login do not throw exception for unknown users.
2013-09-26 20:04:27 +02:00
Petter Reinholdtsen
3c78b92d04
Add support for radio buttons.
2013-09-19 12:35:16 +02:00
Nick Daly
4c42c1ad1f
Merge pull request #20 from petterreinholdtsen/expert-user-access
...
Fix expert user access checks.
2013-09-15 16:11:18 -07:00
Nick Daly
04a266729e
Merge pull request #22 from p1otr/master
...
use stdlib's json module if simplejson is missing
2013-09-15 16:09:58 -07:00
James Valleroy
5be8a552ab
Enable multithread for UserStore DB.
2013-09-12 23:14:07 -04:00
Petter Reinholdtsen
7ff6ea14e2
Rewrite fix for UserStore.expert() to be more like UserStoreOld.expert().
2013-09-11 20:31:12 +02:00
Petter Reinholdtsen
6effc94349
Fix expert user access checks.
...
Several places in the code, cfg.users.expert() is used as a boolean
test to see if the current user is an expert user. But this do not work.
Change the implementation of expert() to assume the current user if no
argument is given, to get the code working.
2013-09-11 20:11:56 +02:00
Piotr Ożarowski
20d4f961b6
use stdlib's json module if simplejson is missing
...
json is available in Python >= 2.6
2013-09-10 23:12:46 +02:00
Nick Daly
dc5139bd2d
Simplify authentication code.
2013-09-08 16:53:40 -05:00
Nick Daly
ad7f932fe8
Merged: Add time to auth.py
...
Author: Tzafrir Cohen <tzafrir@debian.org>
Desription: Missing import from auth.py
http://git.tzafrir.org.il/?p=plinth/plinth.git
2013-09-08 16:52:57 -05:00
Tom Galloway
2bd413e657
If needed instead of an elif.
2013-04-24 09:29:58 +01:00
Nick Daly
f55c7a48ea
Merged with James's upstream.
...
Hope I did it right. If I screwed up, withsqlite is borked.
2013-04-23 17:49:22 -05:00
Nick Daly
1492fe9728
Unify authentication errors.
...
Give the same error if the username doesn't exist or if the password
is wrong. If we deliver separate errors, we tell the attacker whether
they've picked a valid password or not.
Also, if username doesn't exist, hash the password anyway to avoid
this timing side-channel attack:
1. Invalid Username:
A. User tries to log in with invalid username.
B. User name is not found in database.
C. Password is never hashed.
2. Invalid Password:
A. User tries to log in with valid username.
B. User name is found in database.
C. Password is hashed.
Given that proper password hashing will take a minute, *not* hashing
the password takes so much less time that we've effectively indicated
to the attacker that the username didn't exist, regardless of the
error message. This way, no such error occurs.
2013-03-23 19:59:20 -05:00
Tom Galloway
c4cddbfc0e
Changes to get user management screens started. Updated UserStore to add all expected functions. Added tests for these functions.
2013-01-21 10:30:52 +00:00
Sean O'Brien
638b287d1b
new template based upon bootstrap
2012-03-12 14:39:31 -04:00
James Vasile
79de884549
complete the transition to sqlite
2012-02-19 15:07:14 -05:00
James Vasile
4409f1598d
autocommit
2012-02-19 15:07:14 -05:00
James Vasile
e8464fa113
add TODO: at exit, commit db
2012-02-19 15:07:14 -05:00
James Vasile
d082538aee
move to sqlite3 + json dict storage for users
2012-02-19 15:07:13 -05:00
James Vasile
35071d7212
...
2011-02-22 13:32:45 -05:00