derricksmith / phpsaml

GLPI Plugin - SAML integration using the Onelogin SAML Library
MIT License
32 stars 24 forks source link

Update phpsaml.class.php #94

Closed DonutsNL closed 2 years ago

DonutsNL commented 2 years ago

Fix for GetAuthN.

Used following to locally test the changed function.

function eval_Authn($value){ if(preg_match('/^none,.+/i', $value)){ return true; }else{ return false; } }

$tests = array('none' => false, 'none,x509' => true, 'none,Password' => true, 'none,PasswordProtectedTransport' => true, 'none,' => false);

foreach($tests as $v => $r){ if(eval_Authn($v) == $r){ print "$v returned expected value
"; }else{ print "$v DID NOT return expected value!
"; } }


Fixed issue in which port number was included with HTTP_HOST. GLPI redirect does not allow port numbers in provided redirects.