-
Notifications
You must be signed in to change notification settings - Fork 9
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
User and role bug fixed #435
User and role bug fixed #435
Conversation
for password_regex in password_regexs: | ||
if password_regex.match(password): | ||
is_valid_password = True | ||
is_valid_password_check1 = True |
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.
self.log("Password meets character type and length requirements.", "INFO")
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.
Updated the code accordingly.
- The password must include characters from at least three of the following classes: | ||
lowercase letters, uppercase letters, digits, and special characters. | ||
""" | ||
is_valid_password = False | ||
is_valid_password_check1 = False |
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.
meets_character_requirements = False
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.
Updated the code accordingly.
- The password must include characters from at least three of the following classes: | ||
lowercase letters, uppercase letters, digits, and special characters. | ||
""" | ||
is_valid_password = False | ||
is_valid_password_check1 = False | ||
is_valid_password_check2 = False |
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.
passes_sequence_repetition_check = False
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.
Updated the code accordingly.
for password_regex in password_regexs: | ||
if password_regex.match(password): | ||
is_valid_password = True | ||
is_valid_password_check1 = True | ||
break | ||
|
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.
if not meets_character_requirements:
self.log("Password failed character type and length validation.", "ERROR")
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.
Updated the code accordingly.
if not is_valid_password: | ||
self.log("Checking that the password does not contain repetitive or sequential characters.", "DEBUG") | ||
if re.match(password_sequence_repetitive_regex, password): | ||
is_valid_password_check2 = True |
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.
passes_sequence_repetition_check = True
self.log("Password passed repetitive and sequential character checks.", "INFO")
else:
self.log("Password failed repetitive or sequential character validation.", "ERROR")
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.
Updated the code accordingly.
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.
Also tested the changes Madhan
Description
The below issue is fixed
1 Incorrect error message, for bad password.
Type of Change
Checklist
Ansible Best Practices
ansible-vault
or environment variables)Documentation
Screenshots (if applicable)
Notes to Reviewers