Skip to content

Password authentication made stronger. Error messages more informative - #882

Open
pree-T wants to merge 3 commits into
enviroCar:masterfrom
pree-T:master
Open

Password authentication made stronger. Error messages more informative#882
pree-T wants to merge 3 commits into
enviroCar:masterfrom
pree-T:master

Conversation

@pree-T

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

Copy link
Copy Markdown

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


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
Copy Markdown
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
Copy Markdown
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_invalid_username">This username is too short.Username must be of atleast 6 characters.</string>
<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
Copy Markdown
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="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
Copy Markdown
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.

<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
Copy Markdown
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.

2 participants