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

Fix bug with timestamp handling when shibboleth is sending microseconds......

Fix bug with timestamp handling when shibboleth is sending microseconds... Also some missing commas in the config template

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@168 44740490-163a-0410-bde0-09ae8108e29a
parent 5157a9e8
No related branches found
No related tags found
No related merge requests found
......@@ -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',
/*
......
......@@ -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' .
......
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