OpenConext / OpenConext-engineblock

OpenConext SAML 2.0 IdP/SP Gateway
14 stars 22 forks source link

Exception thrown when IdP responds with a <saml:StatusCode> other than Success #1288

Closed tvdijen closed 5 months ago

tvdijen commented 6 months ago

"An exceptional condition occurred, it has been logged and sent to the administrator."

Mar 6 15:08:56 EBLOG-IDPB-OVERIG[1247]: [2024-03-06 15:08:56] app.ERROR: Argument 1 passed to OpenConext\EngineBlockBundle\Authentication\Service\SamlResponseHelper::createAuthnFailedResponse() must be of the type string, null given, called in /apps/installation/OpenConext-engineblock/OpenConext-engineblock-6.13.0/src/OpenConext/EngineBlockBundle/Twig/Extensions/Extension/Feedback.php on line 190

{"session_id":"ep5iou6bqkbqtm7gtnaibl6a2n","request_id":"65e878f8410b8"} {"exception":"[object] (TypeError(code: 0): Argument 1 passed to OpenConext\EngineBlockBundle\Authentication\Service\SamlResponseHelper::createAuthnFailedResponse() must be of the type string, null given, called in /apps/installation/OpenConext-engineblock/OpenConext-engineblock-6.13.0/src/OpenConext/EngineBlockBundle/Twig/Extensions/Extension/Feedback.php on line 190 at /apps/installation/OpenConext-engineblock/OpenConext-engineblock-6.13.0/src/OpenConext/EngineBlockBundle/Authentication/Service/SamlResponseHelper.php:41)"}

After a refresh the "pretty" Twig-error page was shown.

thijskh commented 6 months ago

Quite sure it's this commit which changed the way variables are passed to createAuthnFailedReponse() from feedbackinfo, likely it can now be null where it couldn't be previously? 74a2d8c6f131cf6ef635f4e3a1684e29502792f3

tvdijen commented 6 months ago

I haven't had time to dive in, but it's clearly not something covered by unit tests.. Worth opening an issue