[java-identity-provider COMMIT] in /trunk: idp-conf/src/main/resources/views/login.vm idp-war/src/main/webapp/WEB-INF...
noreply at shibboleth.net
noreply at shibboleth.net
Wed Jul 23 15:21:32 EDT 2014
Author: scantor
Date: Wed Jul 23 15:21:32 2014
New Revision: 6340
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=6340&view=rev
Log:
Add conditional to handle empty exception messages.
Modified:
trunk/idp-conf/src/main/resources/views/login.vm
trunk/idp-war/src/main/webapp/WEB-INF/jsp/login.jsp
Modified: trunk/idp-conf/src/main/resources/views/login.vm
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-conf/src/main/resources/views/login.vm?rev=6340&r1=6339&r2=6340&view=diff
==============================================================================
--- trunk/idp-conf/src/main/resources/views/login.vm (original)
+++ trunk/idp-conf/src/main/resources/views/login.vm Wed Jul 23 15:21:32 2014
@@ -34,7 +34,11 @@
</p>
#elseif ( $authenticationErrorContext && $authenticationErrorContext.getExceptions().size() > 0 )
<p class="form-element form-error">
- ERROR: $encoder.encodeForHTML($authenticationErrorContext.getExceptions().get(0).getMessage())
+ #if ( $authenticationErrorContext.getExceptions().get(0).getMessage() )
+ ERROR: $encoder.encodeForHTML($authenticationErrorContext.getExceptions().get(0).getMessage())
+ #else
+ ERROR: $encoder.encodeForHTML($authenticationErrorContext.getExceptions().get(0).getClass().getName())
+ #end
</p>
#end
Modified: trunk/idp-war/src/main/webapp/WEB-INF/jsp/login.jsp
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-war/src/main/webapp/WEB-INF/jsp/login.jsp?rev=6340&r1=6339&r2=6340&view=diff
==============================================================================
--- trunk/idp-war/src/main/webapp/WEB-INF/jsp/login.jsp (original)
+++ trunk/idp-war/src/main/webapp/WEB-INF/jsp/login.jsp Wed Jul 23 15:21:32 2014
@@ -39,13 +39,17 @@
final AuthenticationErrorContext authenticationErrorContext = (AuthenticationErrorContext) request.getAttribute("authenticationErrorContext");
if (authenticationErrorContext != null) { %>
<section>
- <% if ( authenticationErrorContext != null && !authenticationErrorContext.getClassifiedErrors().isEmpty()) { %>
+ <% if (authenticationErrorContext != null && !authenticationErrorContext.getClassifiedErrors().isEmpty()) { %>
<p class="form-element form-error">
ERROR: <%= HTMLEncoder.encodeForHTML(authenticationErrorContext.getClassifiedErrors().toString()) %>
</p>
- <% } else if ( authenticationErrorContext != null && !authenticationErrorContext.getExceptions().isEmpty()) { %>
+ <% } else if (authenticationErrorContext != null && !authenticationErrorContext.getExceptions().isEmpty()) { %>
<p class="form-element form-error">
- ERROR: <%= HTMLEncoder.encodeForHTML(authenticationErrorContext.getExceptions().get(0).getMessage()) %>
+ <% if (authenticationErrorContext.getExceptions().get(0).getMessage() != null) { %>
+ ERROR: <%= HTMLEncoder.encodeForHTML(authenticationErrorContext.getExceptions().get(0).getMessage()) %>
+ <% } else { %>
+ ERROR: <%= HTMLEncoder.encodeForHTML(authenticationErrorContext.getExceptions().get(0).getClass().getName()) %>
+ <% } %>
</p>
<% } %>
More information about the commits
mailing list