Skip to content

Commit

Permalink
enh: views are backslashes instead of empty strings, which will save …
Browse files Browse the repository at this point in the history
…a redirect
  • Loading branch information
lprimak committed Sep 17, 2024
1 parent 8ece8a3 commit d5c00e1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public boolean isLoggedIn() {
}

public boolean redirectIfLoggedIn() {
return redirectIfLoggedIn("");
return redirectIfLoggedIn("/");
}

public boolean redirectIfLoggedIn(String view) {
Expand Down Expand Up @@ -155,7 +155,7 @@ public static void redirectToView(FallbackPredicate useFallbackPath, String fall
public static void login(String username, String password, boolean rememberMe) {
try {
SecurityUtils.getSubject().login(new UsernamePasswordToken(username, password, rememberMe));
redirectToSaved(Faces.getRequestAttribute(LOGIN_PREDICATE_ATTR_NAME), "");
redirectToSaved(Faces.getRequestAttribute(LOGIN_PREDICATE_ATTR_NAME), "/");
} catch (AuthenticationException e) {
Faces.setFlashAttribute(DEFAULT_ERROR_KEY_ATTRIBUTE_NAME, e);
int loginFailedWaitTime = Faces.getRequestAttribute(LOGIN_WAITTIME_ATTR_NAME);
Expand Down

0 comments on commit d5c00e1

Please sign in to comment.