Files
habitica/website/views/auth/reset-password-set-new-one.jade
T
Matteo Pagliazzi d30e7b9251 Don't send plaintext reset passwords via email (#8457)
* start work to avoid sending reset password in plaintext via email

* start checking parameters

* fix new password reset email

* render error if password reset code is missing or invalid

* implement POST route, conversion to bcrypt and messages

* add auth.local.passwordResetCode field

* add failing tests, move reset code validation func to lib, fixes, remove old tests

* fix unit tests

* fix page rendering and add integration tests

* fix password reset page

* add integration test

* fix string

* fix tests url
2017-02-14 18:08:31 +01:00

28 lines
1021 B
Plaintext

extends ../static/layout
block vars
- var layoutEnv = env // needed to pass env variable to ./layout
block title
title Habitica | 
=env.t('passwordResetPage')
block content
.row(ng-controller='AccordionCtrl')
.col-md-12
.page-header
h1=env.t('passwordResetPage')
if message
p.lead(class=hasError ? 'text-danger' : 'text-success')=message
hr
if success !== true
// action empty is necessary to prevent Angular from handling the form itself (# causes issues)
form(method='post', action='')
.form-group
label(for='newPass')=env.t('newPass')
input#newPass.form-control(name='newPassword', type='password', placeholder=env.t('newPass'))
.form-group
label(for='confirmPass')=env.t('confirmPass')
input#confirmPass.form-control(name='confirmPassword', type='password', placeholder=env.t('confirmPass'))
button.btn.btn-default(type='submit')=env.t('submit')