[java-identity-provider COMMIT] /trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/duo/impl/DuoSupport.java

noreply at shibboleth.net noreply at shibboleth.net
Fri Sep 30 22:27:03 EDT 2016


Author: scantor
Date: Fri Sep 30 22:27:03 2016
New Revision: 8441

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=8441&view=rev
Log:
IDP-1013 - Login flow for Duo iframe-based authentication

https://issues.shibboleth.net/jira/browse/IDP-1013

Add an array bound exception trap Marvin was seeing in production.

Modified:
    trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/duo/impl/DuoSupport.java

Modified: trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/duo/impl/DuoSupport.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/duo/impl/DuoSupport.java?rev=8441&r1=8440&r2=8441&view=diff
==============================================================================
--- trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/duo/impl/DuoSupport.java	(original)
+++ trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/duo/impl/DuoSupport.java	Fri Sep 30 22:27:03 2016
@@ -76,10 +76,14 @@
     @Nonnull @NotEmpty public static String validateSignedResponseToken(@Nonnull final DuoIntegration duo,
             @Nonnull @NotEmpty final String signedResponseToken)
         throws DuoWebException, InvalidKeyException, IOException, NoSuchAlgorithmException {
-        
-        final String username = DuoWeb.verifyResponse(duo.getIntegrationKey(), duo.getSecretKey(),
-                duo.getApplicationKey(), signedResponseToken);
-        return username;
+        try {
+            final String username = DuoWeb.verifyResponse(duo.getIntegrationKey(), duo.getSecretKey(),
+                    duo.getApplicationKey(), signedResponseToken);
+            return username;
+        } catch (final ArrayIndexOutOfBoundsException e) {
+            // This guard is to prevent an unusual issue being encountered by at least one deployer.
+            throw new DuoWebException(e.getMessage());
+        }
     }
 // Checkstyle: ThrowsCount ON
     



More information about the commits mailing list