Skip to content

Commit

Permalink
change the method for the password's minLength to be max, so if a big…
Browse files Browse the repository at this point in the history
…ger value than 6 is retrieved from "system.security.passwordEnforcement.minLength" this is taken into account (#6953)
  • Loading branch information
alexarobu committed Mar 30, 2023
1 parent f909c1d commit 159d82b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion web-ui/src/main/resources/catalog/js/LoginController.js
Expand Up @@ -84,7 +84,8 @@
$scope.isShowLoginAsLink = gnGlobalSettings.isShowLoginAsLink;
$scope.isUserProfileUpdateEnabled = gnGlobalSettings.isUserProfileUpdateEnabled;

$scope.passwordMinLength = Math.min(
// take the bigger of the two values
$scope.passwordMinLength = Math.max(
gnConfig["system.security.passwordEnforcement.minLength"],
6
);
Expand Down
Expand Up @@ -118,7 +118,8 @@
$scope.isLoadingGroups = false;

gnConfigService.load().then(function (c) {
$scope.passwordMinLength = Math.min(
// take the bigger of the two values
$scope.passwordMinLength = Math.max(
gnConfig["system.security.passwordEnforcement.minLength"],
6
);
Expand Down

0 comments on commit 159d82b

Please sign in to comment.