diff options
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/templates/new_security/register_user.html | 2 | ||||
-rw-r--r-- | wqflask/wqflask/user_manager.py | 14 |
2 files changed, 13 insertions, 3 deletions
diff --git a/wqflask/wqflask/templates/new_security/register_user.html b/wqflask/wqflask/templates/new_security/register_user.html index 6a7f4c9c..755d0438 100644 --- a/wqflask/wqflask/templates/new_security/register_user.html +++ b/wqflask/wqflask/templates/new_security/register_user.html @@ -71,7 +71,7 @@ <label class="control-label" for="password">Password</label> <div class="controls"> <input id="password" name="password" type="password" value="" - data-trigger="change" data-required="true" data-minlength="6" data-maxlength="30"> + data-trigger="change" data-required="true" data-minlength="6"> </div> </div> diff --git a/wqflask/wqflask/user_manager.py b/wqflask/wqflask/user_manager.py index d03910ca..c05bb9ce 100644 --- a/wqflask/wqflask/user_manager.py +++ b/wqflask/wqflask/user_manager.py @@ -65,8 +65,8 @@ class RegisterUser(object): self.errors.append('Organization needs to be empty or between 5 and 50 characters.') user.password = kw.get('password', '') - if not (6 <= len(user.password) <= 30): - self.errors.append('Password needs to be between 6 and 30 characters.') + if not (6 <= len(user.password)): + self.errors.append('Password needs to be at least 6 characters.') if kw.get('password_confirm') != user.password: self.errors.append("Passwords don't match.") @@ -87,3 +87,13 @@ class RolesManager(object): def __init__(self): self.roles = model.Role.query.all() print("Roles are:", self.roles) + + +#class Password(object): +# """To generate a master password: dd if=/dev/urandom bs=32 count=1 > master_salt""" +# +# master_salt = + + + + |