Skip to content

Commit

Permalink
added autocomplete=off to new password fields, should fix #7
Browse files Browse the repository at this point in the history
  • Loading branch information
sonicnkt committed Apr 8, 2021
1 parent d83c08c commit 3cade07
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ class EditGlauthForm(FlaskForm):
# Add Custom Validation, either ldap or ldaps must be enabled?

class ChangePasswordForm(FlaskForm):
oldpassword = PasswordField('Previous Password', validators=[DataRequired()])
newpassword1 = PasswordField('New Password', validators=[DataRequired()])
newpassword2 = PasswordField('Repeat Password', validators=[DataRequired(), Length(min=6, max=20), EqualTo('newpassword1')])
oldpassword = PasswordField('Current Password', validators=[DataRequired()], render_kw={"autocomplete": "off"})
newpassword1 = PasswordField('New Password', validators=[DataRequired()], render_kw={"autocomplete": "new-password"})
newpassword2 = PasswordField('Repeat Password', validators=[DataRequired(), Length(min=6, max=20), EqualTo('newpassword1')],
render_kw={"autocomplete": "new-password"}, description='TEST')
submit = SubmitField('Change Password')

def __init__(self, old_password_hash, *args, **kwargs):
Expand Down

0 comments on commit 3cade07

Please sign in to comment.