Enforce pass min/max lengths in dashboard

This commit is contained in:
Bobby Wibowo 2019-09-19 14:23:48 +07:00
parent c3d61733af
commit 6e27115f38
No known key found for this signature in database
GPG Key ID: 51C3A1E1E22D26CF
5 changed files with 8 additions and 7 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1656,13 +1656,13 @@ page.changePassword = (params = {}) => {
<div class="field"> <div class="field">
<label class="label">New password:</label> <label class="label">New password:</label>
<div class="control"> <div class="control">
<input id="password" class="input" type="password" min="6" max="64"> <input id="password" class="input" type="password" minlength="6" maxlength="64">
</div> </div>
</div> </div>
<div class="field"> <div class="field">
<label class="label">Re-type new password:</label> <label class="label">Re-type new password:</label>
<div class="control"> <div class="control">
<input id="passwordConfirm" class="input" type="password" min="6" max="64"> <input id="passwordConfirm" class="input" type="password" minlength="6" maxlength="64">
</div> </div>
</div> </div>
<div class="field"> <div class="field">
@ -1681,6 +1681,7 @@ page.changePassword = (params = {}) => {
page.updateTrigger(params.trigger, 'active') page.updateTrigger(params.trigger, 'active')
document.querySelector('#sendChangePassword').addEventListener('click', event => { document.querySelector('#sendChangePassword').addEventListener('click', event => {
if (!page.dom.querySelector('form').checkValidity()) return
if (document.querySelector('#password').value === document.querySelector('#passwordConfirm').value) if (document.querySelector('#password').value === document.querySelector('#passwordConfirm').value)
page.sendNewPassword(document.querySelector('#password').value, event.currentTarget) page.sendNewPassword(document.querySelector('#password').value, event.currentTarget)
else else

View File

@ -17,9 +17,9 @@ Normal priority:
* [x] Show expiry date in thumbs view. * [x] Show expiry date in thumbs view.
* [ ] Add Select all checkbox somewhere in thumbs view. * [ ] Add Select all checkbox somewhere in thumbs view.
* [x] Display renders after API check. * [x] Display renders after API check.
* [ ] Enforce pass min/max lengths in dashboard's change password form. * [x] Enforce pass min/max lengths in dashboard's change password form.
* [ ] Add a copy all links to clipboard when there are more than 2 uploads in history. * [ ] Add a copy all links to clipboard when there are more than 2 uploads in history.
* [*] Update fb_share.png. * [x] Update fb_share.png.
Low priority: Low priority:

View File

@ -15,7 +15,7 @@
v3: CSS and JS files (libs such as bulma, lazyload, etc). v3: CSS and JS files (libs such as bulma, lazyload, etc).
v4: Renders in /public/render/* directories (to be used by render.js). v4: Renders in /public/render/* directories (to be used by render.js).
#} #}
{% set v1 = "YFsTqC68Bc" %} {% set v1 = "sWcNtiNy3c" %}
{% set v2 = "hiboQUzAzp" %} {% set v2 = "hiboQUzAzp" %}
{% set v3 = "YFsTqC68Bc" %} {% set v3 = "YFsTqC68Bc" %}
{% set v4 = "S3TAWpPeFS" %} {% set v4 = "S3TAWpPeFS" %}