From 7f64c475d55f602805674f190103360bb5c7793d Mon Sep 17 00:00:00 2001 From: Eshaan Bansal Date: Sun, 19 Apr 2020 21:44:30 +0530 Subject: [PATCH] fix pwd truncation error --- src/FlaskRTBCTF/models.py | 2 +- src/FlaskRTBCTF/users/forms.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FlaskRTBCTF/models.py b/src/FlaskRTBCTF/models.py index a5c24b1..2d72387 100644 --- a/src/FlaskRTBCTF/models.py +++ b/src/FlaskRTBCTF/models.py @@ -39,7 +39,7 @@ class User(db.Model, UserMixin): id = db.Column(db.Integer, primary_key=True) username = db.Column(db.String(24), unique=True, nullable=False) email = db.Column(db.String(88), unique=True, nullable=False) - password = db.Column(db.String(48), nullable=False) + password = db.Column(db.String(64), nullable=False) isAdmin = db.Column(db.Boolean, default=False) score = db.relationship("Score", backref="user", lazy=True, uselist=False) if LOGGING: diff --git a/src/FlaskRTBCTF/users/forms.py b/src/FlaskRTBCTF/users/forms.py index d611549..a1c0ab4 100644 --- a/src/FlaskRTBCTF/users/forms.py +++ b/src/FlaskRTBCTF/users/forms.py @@ -14,7 +14,7 @@ class RegistrationForm(FlaskForm): "Email", validators=[DataRequired(), Email(), Length(min=6, max=88)] ) password = PasswordField( - "Password", validators=[DataRequired(), Length(min=4, max=48)] + "Password", validators=[DataRequired(), Length(min=4, max=32)] ) confirm_password = PasswordField( "Confirm Password", validators=[DataRequired(), EqualTo("password")]