[java-identity-provider] branch main updated: IDP-2017 Review all classes for exclusive use of javax.servlet attributes

Rod Widdowson rdw at steadingsoftware.com
Mon Dec 18 11:36:39 UTC 2023


This is an automated email from the git hooks/post-receive script.

rdw pushed a commit to branch main
in repository java-identity-provider.

View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=bcddd356947367bcf1c3035994e88ab7ce4bacc3

The following commit(s) were added to refs/heads/main by this push:
     new bcddd3569 IDP-2017 Review all classes for exclusive use of javax.servlet attributes
bcddd3569 is described below

commit bcddd356947367bcf1c3035994e88ab7ce4bacc3
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Mon Dec 18 11:33:56 2023 +0000

    IDP-2017 Review all classes for exclusive use of javax.servlet attributes
    
    https://shibboleth.atlassian.net/browse/IDP-2017
    
    Make sure that we check jakarta.XXX first and then javax.XXX
---
 .../shibboleth/idp/authn/impl/ExtractX509CertificateFromRequest.java   | 2 +-
 .../src/main/java/net/shibboleth/idp/authn/impl/X509ProxyFilter.java   | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ExtractX509CertificateFromRequest.java b/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ExtractX509CertificateFromRequest.java
index 1cd65754f..2167905e2 100644
--- a/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ExtractX509CertificateFromRequest.java
+++ b/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ExtractX509CertificateFromRequest.java
@@ -66,7 +66,7 @@ public class ExtractX509CertificateFromRequest extends AbstractExtractionAction
                 (X509Certificate[]) httpRequest.getAttribute("jakarta.servlet.request.X509Certificate");
         if (certs == null || certs.length == 0) {
             // Check for older Java variant (probably moot at this point).
-            certs = (X509Certificate[]) httpRequest.getAttribute("java.servlet.request.X509Certificate");
+            certs = (X509Certificate[]) httpRequest.getAttribute("javax.servlet.request.X509Certificate");
         }
 
         if (certs == null || certs.length == 0) {
diff --git a/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/X509ProxyFilter.java b/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/X509ProxyFilter.java
index 7579276dc..4fa554e54 100644
--- a/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/X509ProxyFilter.java
+++ b/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/X509ProxyFilter.java
@@ -96,7 +96,8 @@ public class X509ProxyFilter implements Filter {
             X509Certificate[] certs =
                     (X509Certificate[]) request.getAttribute("jakarta.servlet.request.X509Certificate");
             if (null == certs || 0 == certs.length) {
-                certs = (X509Certificate[]) request.getAttribute("jakarta.servlet.request.X509Certificate");
+                // Check for older Java variant (probably moot at this point).
+                certs = (X509Certificate[]) request.getAttribute("javax.servlet.request.X509Certificate");
             }
             
             if (null == certs || 0 == certs.length) {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list