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

Update the password length validation with Password max allowed length config. #7185

Merged
merged 15 commits into from
Dec 20, 2024

Conversation

Malith-19
Copy link
Contributor

@Malith-19 Malith-19 commented Dec 6, 2024

Purpose

With the introduction of new config for the password max allowed length, updated the validations with that config.

Related Issues

Related PRs

Checklist

  • e2e cypress tests locally verified. (for internal contributers)
  • Manual test round performed and verified.
  • UX/UI review done on the final implementation.
  • Documentation provided. (Add links if there are any)
  • Relevant backend changes deployed and verified
  • Unit tests provided. (Add links if there are any)
  • Integration tests provided. (Add links if there are any)

Security checks

Copy link

codecov bot commented Dec 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 32.32%. Comparing base (aeeeed4) to head (99ed0d0).
Report is 252 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7185      +/-   ##
==========================================
+ Coverage   32.02%   32.32%   +0.30%     
==========================================
  Files          41       42       +1     
  Lines         893      897       +4     
  Branches      204      221      +17     
==========================================
+ Hits          286      290       +4     
+ Misses        607      587      -20     
- Partials        0       20      +20     
Flag Coverage Δ
@wso2is/core 32.32% <ø> (+0.30%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 7 files with indirect coverage changes

Comment on lines 6 to 7
"@wso2is/core": minor
"@wso2is/i18n": minor
Copy link
Contributor

Choose a reason for hiding this comment

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

Since the changes to core and i18n are minor, let's add a separate changeset for those modules with patch version upgrade.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed by 3f33e36

@@ -163,6 +163,7 @@ export class Config {
window["AppUtils"]?.getConfig()?.ui?.isMultipleEmailsAndMobileNumbersEnabled,
isPasswordInputValidationEnabled: window["AppUtils"]?.getConfig()?.ui?.isPasswordInputValidationEnabled,
isProfileUsernameReadonly: window["AppUtils"]?.getConfig()?.ui?.isProfileUsernameReadonly,
passwordPolicyConfigs: window[ "AppUtils" ]?.getConfig()?.ui?.passwordPolicyConfigs,
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't use this value anywhere in myaccount, do we? if it's not used, better not to add it here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed by 74c5553

.VALIDATION_CONFIGURATION_FORM_FIELD_CONSTRAINTS
.PASSWORD_MAX_LENGTH
}
maxLength={ maxPasswordValueLength }
Copy link
Contributor

Choose a reason for hiding this comment

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

Will we need maxLength to be configured since the input is a number field?

@@ -99,6 +99,9 @@ export const ValidationConfigEditPage: FunctionComponent<MyAccountSettingsEditPa
state?.config?.ui?.features?.loginAndRegistration?.disabledFeatures);
const isRuleBasedPasswordExpiryDisabled: boolean = disabledFeatures?.includes("ruleBasedPasswordExpiry");
const featureConfig: FeatureConfigInterface = useSelector((state: AppState) => state?.config?.ui?.features);
const maxPasswordValue: number = useSelector((state: AppState) =>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const maxPasswordValue: number = useSelector((state: AppState) =>
const maxPasswordLength: number = useSelector((state: AppState) =>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed by 00a3218 and renamed according to the support PR suggestion from kayathri.

@Malith-19 Malith-19 self-assigned this Dec 10, 2024
@wso2-jenkins-bot
Copy link
Contributor

🦋 Changeset detected

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

@Malith-19 Malith-19 added trigger-pr-builder Manually trigger PR builder workflow and removed trigger-pr-builder Manually trigger PR builder workflow labels Dec 20, 2024
@kayathiri4 kayathiri4 merged commit ec7677a into wso2:master Dec 20, 2024
14 of 15 checks passed
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.

4 participants