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

fix: hide warning for weak password unless it actually applies [DET-10216] #9538

Merged
merged 1 commit into from
Jun 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions webui/react/src/components/DeterminedAuth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,16 @@ const DeterminedAuth: React.FC<Props> = ({ canceler }: Props) => {
authStore.setAuth({ isAuthenticated: true, token });
user.isPasswordWeak = isPasswordWeak(creds.password || '');
userStore.updateCurrentUser(user);
handleWarning({
level: ErrorLevel.Warn,
publicMessage:
'Your current password is either blank or weak according to current security recommendations. Please change your password.',
publicSubject: 'Weak Password',
silent: false,
type: ErrorType.Input,
});
if (user.isPasswordWeak) {
handleWarning({
level: ErrorLevel.Warn,
publicMessage:
'Your current password is either blank or weak according to current security recommendations. Please change your password.',
publicSubject: 'Weak Password',
silent: false,
type: ErrorType.Input,
});
}
if (rbacEnabled) {
// Now that we have logged in user, fetch userAssignments and userRoles and place into store.
permissionStore.fetch(canceler.signal);
Expand Down
Loading