diff --git a/frontend/src/components/dialog/user-password-widgets/user-set-password-dialog.js b/frontend/src/components/dialog/user-password-widgets/user-set-password-dialog.js index a6c90866d57..8162275c036 100644 --- a/frontend/src/components/dialog/user-password-widgets/user-set-password-dialog.js +++ b/frontend/src/components/dialog/user-password-widgets/user-set-password-dialog.js @@ -31,7 +31,7 @@ const UserSetPassword = ({ toggle }) => { return; } if (!validatePassword(password)) { - setErrorMessage(gettext('Insufficient password strength')); + setErrorMessage(gettext('Password strength should be strong or very strong')); return; } diff --git a/frontend/src/components/dialog/user-password-widgets/user-update-password-dialog.js b/frontend/src/components/dialog/user-password-widgets/user-update-password-dialog.js index fc88954137c..a3b3c77f086 100644 --- a/frontend/src/components/dialog/user-password-widgets/user-update-password-dialog.js +++ b/frontend/src/components/dialog/user-password-widgets/user-update-password-dialog.js @@ -39,7 +39,7 @@ const UserUpdatePassword = ({ toggle }) => { setErrorMessage(gettext('New password cannot be the same as old password')); } if (!validatePassword(newPassword)) { - setErrorMessage(gettext('Insufficient password strength')); + setErrorMessage(gettext('Password strength should be strong or very strong')); return; } setErrorMessage(''); diff --git a/seahub/api2/endpoints/user.py b/seahub/api2/endpoints/user.py index eb49ca4bb6d..df6748d3eca 100644 --- a/seahub/api2/endpoints/user.py +++ b/seahub/api2/endpoints/user.py @@ -228,7 +228,7 @@ def post(self, request): return api_error(status.HTTP_400_BAD_REQUEST, 'New password cannot be the same as old password') if not is_password_strength_valid(new_password): - return api_error(status.HTTP_400_BAD_REQUEST, 'Insufficient password strength') + return api_error(status.HTTP_400_BAD_REQUEST, 'Password strength should be strong or very strong') user = request.user if user.enc_password != UNUSABLE_PASSWORD and not old_password: diff --git a/seahub/templates/snippets/password_strength_js.html b/seahub/templates/snippets/password_strength_js.html index fe5273ef2a4..34675e1638a 100644 --- a/seahub/templates/snippets/password_strength_js.html +++ b/seahub/templates/snippets/password_strength_js.html @@ -4,7 +4,7 @@ return (typeof (window) !== 'undefined') && (window.innerWidth < 768 || navigator.userAgent.toLowerCase().match(/(ipod|ipad|iphone|android|coolpad|mmp|smartphone|midp|wap|xoom|symbian|j2me|blackberry|wince)/i) != null); } -var passwd_tip = "{% blocktrans %}Insufficient password strength{% endblocktrans%}"; +var passwd_tip = "{% blocktrans %}Password strength should be strong or very strong{% endblocktrans%}"; var template = `