fix password condition and message
This commit is contained in:
4
auth.py
4
auth.py
@@ -29,7 +29,7 @@ def register():
|
||||
error = 'Password is required.'
|
||||
elif not email:
|
||||
error = 'Email is required.'
|
||||
elif password.lower()== password or password.upper()==password or password.isdigit() or len(password)<=8: #check passwrd complexity
|
||||
elif password.lower()== password or password.upper()==password or password.isdigit() or len(password)<8: #check passwrd complexity
|
||||
error = 'Bedingungen für passwort nicht erfüllt.'
|
||||
|
||||
if error is None:
|
||||
@@ -145,8 +145,6 @@ def confirm_email(token):
|
||||
email = confirm_token(token)
|
||||
except:
|
||||
outcome = 'The confirmation link is invalid or has expired.'
|
||||
#if g.user["confirmed"]: # TODO: Not working like this. User must be logged in for this to work but admin is doing the confirmation. Muss sql query nach email sein.
|
||||
# outcome = 'Account already confirmed.'
|
||||
|
||||
else:
|
||||
db = get_db()
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<label for="password">Password</label>
|
||||
<input type="password" name="password" id="password" required>
|
||||
<br />
|
||||
<label for="email">Passwort muss Groß- und Kleinbuchstaben, Buchstaben und Zahlen enthalten und min. 8 Zeichen lang sein.</label>
|
||||
<label for="email">Passwort muss groß, kleinbuchstaben und Zahlen enthalten und min. 8 Zeichen lang sein.</label>
|
||||
<br />
|
||||
<input type="submit" value="Register">
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user