Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
BZ-1099378 - WAS: no error message shown when user tries to login wit…
Browse files Browse the repository at this point in the history
…h invalid credentials
  • Loading branch information
dgutierr committed May 21, 2014
1 parent b312885 commit ebed6e3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
3 changes: 2 additions & 1 deletion modules/dashboard-webapp/src/main/webapp/login.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@
SessionInitializer.PreferredLocale preferredLocale = SessionInitializer.getPreferredLocale(request);
if (preferredLocale != null) currentLocale = preferredLocale.asLocale();
ResourceBundle i18nBundle = LocaleManager.lookup().getBundle("org.jboss.dashboard.login.messages", currentLocale);
String messageKey = request.getParameter("message");
String messageKey = (String) request.getSession().getAttribute("login.message");
if (messageKey == null) messageKey = "login.hint";
%>
<h3><%= i18nBundle.getString(messageKey) %></h3>
Expand Down
6 changes: 2 additions & 4 deletions modules/dashboard-webapp/src/main/webapp/login_failed.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
--%>
<%
request.getSession().invalidate();
// BZ-1025763: Redirect to the context path, not login.jsp page.
String redirectURL = request.getContextPath() +"?message=login.invalid_credentials";
response.sendRedirect(redirectURL);
request.getSession().setAttribute("login.message", "login.invalid_credentials");
response.sendRedirect(request.getContextPath());
%>
5 changes: 2 additions & 3 deletions modules/dashboard-webapp/src/main/webapp/not_authorized.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
--%>
<%
request.getSession().invalidate();
String redirectURL = request.getContextPath() +"?message=login.not_authorized";
response.sendRedirect(redirectURL);
request.getSession().setAttribute("login.message", "login.not_authorized");
response.sendRedirect(request.getContextPath());
%>

0 comments on commit ebed6e3

Please sign in to comment.