Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change error message #7193

Merged
merged 1 commit into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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('');
Expand Down
2 changes: 1 addition & 1 deletion seahub/api2/endpoints/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion seahub/templates/snippets/password_strength_js.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 = `
<div class="popover show registration-form-popover" role="tooltip">
Expand Down
Loading