Skip to content
Snippets Groups Projects
Commit 6e71d6e2 authored by Olav Morken's avatar Olav Morken
Browse files

Utilities: Use parseSAML2Time instead of strtotime to parse SAML2 timestamps.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@92 44740490-163a-0410-bde0-09ae8108e29a
parent f0d8ff74
No related branches found
No related tags found
No related merge requests found
...@@ -85,14 +85,14 @@ class SimpleSAML_Utilities { ...@@ -85,14 +85,14 @@ class SimpleSAML_Utilities {
$currentTime = time(); $currentTime = time();
if (! empty($start)) { if (! empty($start)) {
$startTime = strtotime($start); $startTime = self::parseSAML2Time($start);
/* Allow for a 10 minute difference in Time */ /* Allow for a 10 minute difference in Time */
if (($startTime < 0) || (($startTime - 600) > $currentTime)) { if (($startTime < 0) || (($startTime - 600) > $currentTime)) {
return FALSE; return FALSE;
} }
} }
if (! empty($end)) { if (! empty($end)) {
$endTime = strtotime($end); $endTime = self::parseSAML2Time($end);
if (($endTime < 0) || ($endTime <= $currentTime)) { if (($endTime < 0) || ($endTime <= $currentTime)) {
return FALSE; return FALSE;
} }
......
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