-
Notifications
You must be signed in to change notification settings - Fork 159
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
Password authentication made stronger. Error messages more informative #882
base: master
Are you sure you want to change the base?
Conversation
…sage is now more informative.
@@ -81,7 +81,7 @@ | |||
private static final Logger LOG = Logger.getLogger(SignupActivity.class); | |||
|
|||
private static final String EMAIL_REGEX = "^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)*(\\.[A-Za-z]{2,})$"; | |||
private static final String PASSWORD_REGEX = "^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9]).{6,}$"; | |||
private static final String PASSWORD_REGEX = "^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=.*[@#$%^&+=])(?=\\S+$).{6,}$"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current implementation is sufficent as of now. Also to implement this enhancement first the changes should be made on server so that the app gets supported with the new changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I revert this change?
<string name="error_username_contain_special">Special symbol not allowed except underscore</string> | ||
<string name="error_field_weak_password">Password must contain at least one uppercase letter, one lowercase letter and one digit</string> | ||
<string name="error_field_weak_password">Password must contain at least one uppercase letter, one lowercase letter , one digit and one special character</string> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert this change.
<string name="error_incorrect_password">This password is incorrect.</string> | ||
<string name="error_invalid_credentials">Username or password is incorrect</string> | ||
<string name="error_field_required">This field is required.</string> | ||
<string name="error_not_connected_to_network">Not connected to network</string> | ||
<string name="register_progress_signing_in">Registering…</string> | ||
<string name="error_passwords_not_matching">The passwords do not match.</string> | ||
<string name="error_invalid_username">This username is too short.</string> | ||
<string name="error_invalid_username">This username is too short.Username must be of atleast 6 characters.</string> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. This is a good enhancement. Kindly remove the extra space between letters and add space after fullstop.
@@ -22,16 +22,16 @@ | |||
<string name="action_sign_in_register">Register</string> | |||
<string name="action_sign_in_short">Sign in</string> | |||
<string name="error_invalid_email">This email address is invalid.</string> | |||
<string name="error_invalid_password">This password is too short.</string> | |||
<string name="error_invalid_password">This password is too short.Password must be of atleast 6 characters.</string> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add space after full-stop.
Password authentication made stronger by adding special character option. Error password and username message is now more informative (shows the exact length required). A possible fix for #881 . Kindly review @asaikarthikeya