Skip to content

fix: Modify the panel password verification rule#8291

Merged
f2c-ci-robot[bot] merged 1 commit intodevfrom
pr@dev@fix_system_password
Apr 2, 2025
Merged

fix: Modify the panel password verification rule#8291
f2c-ci-robot[bot] merged 1 commit intodevfrom
pr@dev@fix_system_password

Conversation

@ssongliu
Copy link
Copy Markdown
Member

@ssongliu ssongliu commented Apr 2, 2025

Refs #4290

@f2c-ci-robot
Copy link
Copy Markdown

f2c-ci-robot Bot commented Apr 2, 2025

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

newPass: [Rules.requiredInput, Rules.noSpace],
newPassComplexity: [Rules.requiredInput, Rules.noSpace, Rules.password],
rePass: [Rules.requiredInput, Rules.noSpace, { validator: checkPasswordSame, trigger: 'blur' }],
});
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 code does not contain any irregularities or potential issues. The only difference appears to be that rules for oldPass and newPassComplexity were removed from the second set of rules. Since these fields do not appear to have additional validation logic, no immediate optimizations are needed.

newPassword: [Rules.requiredInput, Rules.noSpace],
newPasswordComplexity: [Rules.requiredInput, Rules.noSpace, Rules.password],
retryPassword: [Rules.requiredInput, Rules.noSpace, { validator: checkPassword, trigger: 'blur' }],
});
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.

There is one issue found in the code:

Lines 73 to 76 have been removed from the passRules object. This change removes the minimum length validation rule for both new password fields (newPassword) which required passwords be at least six characters long.

Optimization suggestion:
While removing this rule might save on processing time during input validation, it should be reconsidered before implementation if there are concerns with user experience related to requiring stronger passwords (e.g., complexity requirements). You may want to keep it in place or provide an option allowing users to specify password complexity options that align with your security policies.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Apr 2, 2025

Copy link
Copy Markdown
Member

@wanghe-fit2cloud wanghe-fit2cloud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@wanghe-fit2cloud
Copy link
Copy Markdown
Member

/approve

@f2c-ci-robot
Copy link
Copy Markdown

f2c-ci-robot Bot commented Apr 2, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: wanghe-fit2cloud

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@f2c-ci-robot f2c-ci-robot Bot added the approved label Apr 2, 2025
@f2c-ci-robot f2c-ci-robot Bot merged commit ac396b6 into dev Apr 2, 2025
6 checks passed
@f2c-ci-robot f2c-ci-robot Bot deleted the pr@dev@fix_system_password branch April 2, 2025 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants