Skip to content
Snippets Groups Projects
Commit 17b21b6b authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

Patch by Thomas Graff: Handling invalid casing of true and false in authrequest

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1500 44740490-163a-0410-bde0-09ae8108e29a
parent fc53f463
No related branches found
No related tags found
No related merge requests found
......@@ -142,9 +142,9 @@ class SimpleSAML_XML_SAML20_AuthnRequest {
try{
return $this->isSamlBoolTrue($ispas);
}catch(Exception $e){
// ... I don't understand, default to false
return FALSE;
// throw new Exception('Invalid value of IsPassive attribute in SAML2 AuthnRequest.');
// ... I don't understand ...
// return FALSE;
throw new Exception('Invalid value of IsPassive attribute in SAML2 AuthnRequest.');
}
}
......@@ -171,9 +171,9 @@ class SimpleSAML_XML_SAML20_AuthnRequest {
try{
return $this->isSamlBoolTrue($fa);
} catch(Exception $e){
// ... I don't understand, default to false
return FALSE;
// throw new Exception('Invalid value of ForceAuthn attribute in SAML2 AuthnRequest.');
// ... I don't understand ...
// return FALSE;
throw new Exception('Invalid value of ForceAuthn attribute in SAML2 AuthnRequest.');
}
}
......@@ -308,6 +308,7 @@ class SimpleSAML_XML_SAML20_AuthnRequest {
* @return bool TRUE or FALSE
*/
private function isSamlBoolTrue($boolSaml){
$boolSaml = strtolower($boolSaml);
if($boolSaml === 'true' || $boolSaml === '1') {
return TRUE;
} elseif($boolSaml === 'false' || $boolSaml === '0') {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment