From f3712a507ff05478a7e1816f286993e11dee4501 Mon Sep 17 00:00:00 2001 From: Fumiaki Kinoshita Date: Fri, 19 Jul 2024 17:35:52 +0900 Subject: [PATCH] Request: fix a bug that causes `renderXML` to crash --- src/Network/Wai/SAML2/Request.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Network/Wai/SAML2/Request.hs b/src/Network/Wai/SAML2/Request.hs index e527ef1..4d4cafd 100644 --- a/src/Network/Wai/SAML2/Request.hs +++ b/src/Network/Wai/SAML2/Request.hs @@ -33,6 +33,7 @@ module Network.Wai.SAML2.Request ( import Crypto.Random +import Data.Foldable (toList) import Data.Time.Clock import Network.Wai.SAML2.NameIDFormat @@ -132,7 +133,7 @@ renderXML AuthnRequest{..} = , ("AssertionConsumerServiceIndex", "1") -- [AuthnRequest] ] -- [RequestAbstractType] - ++ [("Destination", uri) | let Just uri = authnRequestDestination] )) + ++ [("Destination", uri) | uri <- toList authnRequestDestination] )) [NodeElement issuer, NodeElement nameIdPolicy] -- Reference [RequestAbstractType] issuer = Element