From 2669241c06be9c42f78ddf025efd68ab743b2f8e Mon Sep 17 00:00:00 2001 From: psychobunny Date: Mon, 28 Sep 2015 10:26:10 -0400 Subject: [PATCH] closes #3656 --- package.json | 1 - public/language/en_GB/user.json | 1 + public/src/client/register.js | 2 ++ 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 0c18d6468e..01abacedc3 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,6 @@ "express-session": "^1.8.2", "gravatar": "^1.1.0", "heapdump": "^0.3.0", - "jimp": "^0.2.5", "less": "^2.0.0", "logrotate-stream": "^0.2.3", "lru-cache": "^2.6.1", diff --git a/public/language/en_GB/user.json b/public/language/en_GB/user.json index 9a019791be..083e887a24 100644 --- a/public/language/en_GB/user.json +++ b/public/language/en_GB/user.json @@ -54,6 +54,7 @@ "confirm_password": "Confirm Password", "password": "Password", "username_taken_workaround": "The username you requested was already taken, so we have altered it slightly. You are now known as %1", + "password_same_as_username": "Your password is the same as your username, please select another password.", "upload_picture": "Upload picture", "upload_a_picture": "Upload a picture", diff --git a/public/src/client/register.js b/public/src/client/register.js index cca8617972..25d76a73fe 100644 --- a/public/src/client/register.js +++ b/public/src/client/register.js @@ -176,6 +176,8 @@ define('forum/register', ['csrf', 'translator'], function(csrf, translator) { showError(password_notify, '[[user:change_password_error_length]]'); } else if (!utils.isPasswordValid(password)) { showError(password_notify, '[[user:change_password_error]]'); + } else if (password === $('#username').val()) { + showError(password_notify, '[[user:password_same_as_username]]'); } else { showSuccess(password_notify, successIcon); }