knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject [knox] branch master updated: KNOX-2369 - Fix IllegalStateException in case of expired or invalid token (#334)
Date Wed, 06 May 2020 14:42:31 GMT
This is an automated email from the ASF dual-hosted git repository.

more pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/knox.git


The following commit(s) were added to refs/heads/master by this push:
     new a2a4335  KNOX-2369 - Fix IllegalStateException in case of expired or invalid token
(#334)
a2a4335 is described below

commit a2a4335946b74b27ea23a6cf95c30f69e765517d
Author: Sandeep Moré <moresandeep@gmail.com>
AuthorDate: Wed May 6 10:42:24 2020 -0400

    KNOX-2369 - Fix IllegalStateException in case of expired or invalid token (#334)
---
 .../provider/federation/jwt/filter/SSOCookieFederationFilter.java     | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gateway-provider-security-jwt/src/main/java/org/apache/knox/gateway/provider/federation/jwt/filter/SSOCookieFederationFilter.java
b/gateway-provider-security-jwt/src/main/java/org/apache/knox/gateway/provider/federation/jwt/filter/SSOCookieFederationFilter.java
index 6a37c2f..dcecf4d 100644
--- a/gateway-provider-security-jwt/src/main/java/org/apache/knox/gateway/provider/federation/jwt/filter/SSOCookieFederationFilter.java
+++ b/gateway-provider-security-jwt/src/main/java/org/apache/knox/gateway/provider/federation/jwt/filter/SSOCookieFederationFilter.java
@@ -149,7 +149,9 @@ public class SSOCookieFederationFilter extends AbstractJWTFilter {
       }
 
       // There were no valid cookies found so redirect to login url
-      sendRedirectToLoginURL(req, res);
+      if(res != null && !res.isCommitted()) {
+        sendRedirectToLoginURL(req, res);
+      }
     }
   }
 


Mime
View raw message