Skip to content

Commit

Permalink
Merge pull request from GHSA-g28r-8wg3-7349
Browse files Browse the repository at this point in the history
passwords
  • Loading branch information
pdrtzk committed Jun 22, 2023
1 parent 3fd477d commit 8d89612
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -118,11 +118,11 @@ class LoginController extends CasClientConfigurerAdapter {
password <- jsonNode.retrive("password").asText()
ldapUser <- ldapService.login(username, password)
user <- loadUserFromLdap(ldapUser.getAttribute("uid").getStringValue)
} yield (user, password)
} yield user

login match {
case Some((user, password)) =>
val localUser = userService.find(user.username).getOrElse(userService.create(user, password))
case Some((user)) =>
val localUser = userService.find(user.username).getOrElse(userService.create(user, null))
authService.renewAuthentication(localUser, response)
case None => throw new UnauthorizedException()
}
Expand Down

0 comments on commit 8d89612

Please sign in to comment.