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

Password authentication made stronger. Error messages more informative #882

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

pree-T
Copy link

@pree-T pree-T commented Jan 13, 2022

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

@@ -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,}$";
Copy link
Member

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.

Copy link
Author

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>
Copy link
Member

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&#8230;</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>
Copy link
Member

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>
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants