Skip to content

Node.js based forum software built for the modern web

closes #3656

psychobunny2669241c06be
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 <strong>%1</strong>",
+ "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);
}