diff --git a/config/config-template.php b/config/config-template.php index c9980eb974060e8c22140f40c5dae2e25a22f83b..dfb80660c36b609587a9ec0336b4daa2f595d9a3 100644 --- a/config/config-template.php +++ b/config/config-template.php @@ -123,10 +123,10 @@ $config = array ( */ 'auth.radius.hostname' => 'radius.example.org', 'auth.radius.port' => '1812', - 'auth.radius.secret' => 'topsecret' + 'auth.radius.secret' => 'topsecret', 'auth.radius.URNForUsername' => 'urn:mace:dir:attribute-def:eduPersonPrincipalName', 'auth.radius.vendor' => '23735', - 'auth.radius.vendor-attr' => '4' + 'auth.radius.vendor-attr' => '4', /* diff --git a/lib/SimpleSAML/Utilities.php b/lib/SimpleSAML/Utilities.php index 163cc13226a3f67fdb7c1e6bbbed5c9c11996103..b8b26bf7b288b1d8de02fe6db5f966a86b35d07f 100644 --- a/lib/SimpleSAML/Utilities.php +++ b/lib/SimpleSAML/Utilities.php @@ -229,6 +229,12 @@ class SimpleSAML_Utilities { /* This function converts a SAML2 timestamp on the form * yyyy-mm-ddThh:mm:ssZ to a UNIX timestamp. * + * Andreas comments: + * I got this timestamp from Shibboleth 1.3 IdP: 2008-01-17T11:28:03.577Z + * Therefore I added to possibliity to have microseconds to the format. + * Added: (\.\\d{1,3})? to the regex. + * + * * Parameters: * $time The time we should convert. * @@ -241,7 +247,7 @@ class SimpleSAML_Utilities { /* We use a very strict regex to parse the timestamp. */ if(preg_match('/^(\\d\\d\\d\\d)-(\\d\\d)-(\\d\\d)' . - 'T(\\d\\d):(\\d\\d):(\\d\\d)Z$/D', + 'T(\\d\\d):(\\d\\d):(\\d\\d)(\.\\d{1,3})?Z$/D', $time, $matches) == 0) { throw new Exception( 'Invalid SAML2 timestamp passed to' .