-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
Quando si usa il login in HTTP-POST il campo RelayState all'interno del form che viene inviato risulta vuoto.
Analizzando il codice ho notato questo:
public function postForm($url, $redirectTo = null)
{
$SAMLRequest = base64_encode($this->xml);
$relayState = is_null($redirectTo) ? (isset($_SERVER['HTTPS']) &&
$_SERVER['HTTPS'] === 'on' ? "https" : "http") .
"//{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}" : $redirectTo;
$relayState = base64_encode($relayState);
return <<<HTML
<html>
<body onload="javascript:document.forms[0].submit()">
<form method="post" action="$url">
<input type="hidden" name="SAMLRequest" value="$SAMLRequest">
<input type="hidden" name="RelayState" value="$relayState">
</form>
</body>
</html>
HTML;
}
Effettuando un check con spid_sp_test infatti si ottiene questo:
ERROR:spid_sp_test.authn_request:RelayState is missing
La variable $relayState è risettata a NULL quando invece dovrebbe essere qualcosa del tipo
$relayState = base64_encode($relayState)
Dopo la modifica il test su descritto viene correttamente passato
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels