summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2018-04-03 15:29:40 -0400
committergumi <git@gumi.ca>2018-04-03 15:29:40 -0400
commit3c0b154cd2ca152761b2507f8a4105fe0ca98904 (patch)
tree78449370916617c07af172e68d87926923e45256
parent7c05aaa70b519d7e26476d24bda4016d5f5a1666 (diff)
downloadlanding-3c0b154cd2ca152761b2507f8a4105fe0ca98904.tar.gz
landing-3c0b154cd2ca152761b2507f8a4105fe0ca98904.tar.bz2
landing-3c0b154cd2ca152761b2507f8a4105fe0ca98904.tar.xz
landing-3c0b154cd2ca152761b2507f8a4105fe0ca98904.zip
add a password length warning
-rw-r--r--src/register.html8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/register.html b/src/register.html
index ab03051..6842475 100644
--- a/src/register.html
+++ b/src/register.html
@@ -189,7 +189,7 @@
<input name="username" placeholder="Username" type="text" tabindex="1" minlength="4" maxlength="23" pattern="^[a-zA-Z0-9]{4,23}$" title="4-23 characters, alphanumeric" required autofocus>
</fieldset>
<fieldset>
- <input name="password" placeholder="Password" type="password" tabindex="2" minlength="4" maxlength="23" pattern="^[a-zA-Z0-9]{4,23}$" title="4-23 characters, alphanumeric" required>
+ <input name="password" placeholder="Password" type="password" tabindex="2" minlength="6" maxlength="23" pattern="^[a-zA-Z0-9]{6,23}$" title="6-23 characters, alphanumeric" required>
</fieldset>
<fieldset>
<input name="email" placeholder="Email Address (optional)" type="email" maxlength="39" tabindex="3">
@@ -243,6 +243,12 @@
return;
}
+ if (nodes.pwd.value.length < 12 && !window.confirm("Your password is quite short. For better security you should consider using a password at least 12 characters long.\n\nDo you really want to use a weak password?")) {
+ grecaptcha.reset();
+ nodes.pwd.focus();
+ return;
+ }
+
const req = new Request("/api/account", {
method: "POST",
mode: "same-origin",