[java-identity-provider] branch main updated: IDP-2484 - Allow IdP role in metadata query endpoint

Codeberg noreply at shibboleth.net
Mon Oct 12 14:46:19 UTC 2026


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

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

View the commit online:
https://codeberg.org/Shibboleth/java-identity-provider/commit/0f5a9ecdfc2883fe2abf2e9443bfb3b645a3b557

The following commit(s) were added to refs/heads/main by this push:
     new 0f5a9ecdf IDP-2484 - Allow IdP role in metadata query endpoint
0f5a9ecdf is described below

commit 0f5a9ecdfc2883fe2abf2e9443bfb3b645a3b557
Author: Scott Cantor <scott at restingparrotsoftware.com>
AuthorDate: Mon Oct 12 10:46:09 2026 -0400

    IDP-2484 - Allow IdP role in metadata query endpoint
    
    https://shibboleth.atlassian.net/browse/IDP-2484
    
    Simplify option handling.
---
 .../idp/profile/impl/MetadataQueryRequestDecoder.java  | 18 ++++--------------
 1 file changed, 4 insertions(+), 14 deletions(-)

diff --git a/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/MetadataQueryRequestDecoder.java b/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/MetadataQueryRequestDecoder.java
index 6d0a5c4cb..d27131fb7 100644
--- a/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/MetadataQueryRequestDecoder.java
+++ b/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/MetadataQueryRequestDecoder.java
@@ -140,25 +140,15 @@ public class MetadataQueryRequestDecoder extends AbstractHttpServletRequestMessa
      * @since 5.3.0
      */
     @Nonnull protected QName getRole(@Nonnull final HttpServletRequest request) throws MessageDecodingException {
-        final String idp = StringSupport.trimOrNull(request.getParameter(IDP_PARAM));
-        final String sp = StringSupport.trimOrNull(request.getParameter(SP_PARAM));
         
-        final XSBooleanValue idpflag = XSBooleanValue.valueOf(idp != null ? idp : "0");
-        final XSBooleanValue spflag = XSBooleanValue.valueOf(sp != null ? sp : "0");
+        final boolean idp = request.getParameter(IDP_PARAM) != null;
+        final boolean sp = request.getParameter(SP_PARAM) != null;
         
-        final Boolean idpfinal = idpflag.getValue();
-        final Boolean spfinal = spflag.getValue();
-        
-        if (idpfinal != null && idpfinal && spfinal != null && spfinal) {
+        if (idp && sp) {
             throw new MessageDecodingException("Both IdP and SP roles specified.");
         }
         
-        if (idpfinal != null && idpfinal) {
-            return IDPSSODescriptor.DEFAULT_ELEMENT_NAME;
-        } else {
-            // Default or if set explicitly.
-            return SPSSODescriptor.DEFAULT_ELEMENT_NAME;
-        }
+        return idp ? IDPSSODescriptor.DEFAULT_ELEMENT_NAME : SPSSODescriptor.DEFAULT_ELEMENT_NAME;
     }
 
     /**

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


More information about the commits mailing list