July 4 - Update security
This commit is contained in:
@@ -23,6 +23,7 @@ from flask import Blueprint, render_template, request, flash, redirect, current_
|
||||
from flask_wtf import FlaskForm
|
||||
from wtforms import StringField, PasswordField, SelectField
|
||||
from wtforms.validators import DataRequired, Email, Length, EqualTo, ValidationError
|
||||
from app.utils.forms import strong_password
|
||||
|
||||
bp = Blueprint('signup', __name__, url_prefix='/signup')
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -92,7 +93,8 @@ class SignupForm(FlaskForm):
|
||||
validators=[DataRequired(), Length(min=2, max=32)])
|
||||
plan = SelectField('Plan', choices=[]) # populated in view
|
||||
password = PasswordField('Password',
|
||||
validators=[DataRequired(), Length(min=8, max=128)])
|
||||
validators=[DataRequired(), Length(max=128),
|
||||
strong_password()])
|
||||
confirm = PasswordField('Confirm Password',
|
||||
validators=[EqualTo('password', 'Passwords must match.')])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user