[java-identity-provider] 10/28: IDP-2017 Review all classes for exclusive use of javax.servlet attributes

Scott Cantor cantor.2 at osu.edu
Wed Jan 31 14:51:56 UTC 2024


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

scantor pushed a commit to branch dev/thymeleaf
in repository java-identity-provider.

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

commit 8217a1ac4311b44771e8bb7f23040250d7c8218d
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