Fix yet another login bug - Login process URLs must be sticky.

This commit is contained in:
jeb228 2010-12-15 15:42:21 +00:00
parent bd8ce05082
commit c6c9ac4ed5
2 changed files with 52 additions and 7 deletions

View file

@ -89,7 +89,9 @@ public class Authenticate extends VitroHttpServlet {
VitroRequest vreq = new VitroRequest(request);
try {
recordLoginProcessPages(vreq);
if (loginProcessPagesAreEmpty(vreq)) {
recordLoginProcessPages(vreq);
}
// Where do we stand in the process?
State entryState = getCurrentLoginState(vreq);
@ -136,6 +138,14 @@ public class Authenticate extends VitroHttpServlet {
}
/**
* Once these URLs have been set, don't change them.
*/
private boolean loginProcessPagesAreEmpty(HttpServletRequest request) {
LoginProcessBean bean = LoginProcessBean.getBean(request);
return ((bean.getAfterLoginUrl() == null) && (bean.getLoginPageUrl() == null));
}
/**
* If they supply an after-login page, record it and use the Login page for
* the process. Note that we expect it to be URL-encoded.