From c721d67080739416b92e56e49fa719579755aa20 Mon Sep 17 00:00:00 2001 From: Calvin Montgomery Date: Sat, 11 Mar 2017 17:22:31 -0800 Subject: [PATCH] Add explicit confirmation that accounts are unrecoverable with no email --- package.json | 2 +- templates/register.pug | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 7241711f..56e26f79 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "author": "Calvin Montgomery", "name": "CyTube", "description": "Online media synchronizer and chat", - "version": "3.32.0", + "version": "3.32.1", "repository": { "url": "http://github.com/calzoneman/sync" }, diff --git a/templates/register.pug b/templates/register.pug index 8036a98e..e42ed79f 100644 --- a/templates/register.pug +++ b/templates/register.pug @@ -42,7 +42,9 @@ html(lang="en") .form-group label.control-label(for="email") Email (optional) input#email.form-control(type="email", name="email") - p Providing an email address is optional and will allow you to recover your account via email if you forget your password. Your address will not be shared with anyone. + p + | Providing an email address is optional and will allow you to recover your account via email if you forget your password. + strong   If you do not provide an email address, you will not be able to recover a lost account! button#registerbtn.btn.btn-success.btn-block(type="submit") Register else .col-lg-6.col-lg-offset-3.col-md-6.col-md-offset-3 @@ -56,6 +58,7 @@ html(lang="en") function verify() { var valid = checkUsername(); valid = checkPasswords() && valid; + valid = checkEmail() && valid; return valid; } function checkUsername() { @@ -109,3 +112,10 @@ html(lang="en") } } } + function checkEmail() { + var email = $("#email").val(); + if (email.trim() === "") { + return confirm("Are you sure you want to register without setting a recovery email address? If you lose the password, or if your account is compromised, you WILL NOT be able to recover it."); + } + return true; + }