Fixed no tolerance for missing Z in response timestamp
authorDan
Sat, 16 May 2009 18:24:45 -0400
changeset 22 9b8688df52d5
parent 21 f34ecfa459ab
child 23 4b868c7c241e
child 25 2e7ccbdfdc0a
Fixed no tolerance for missing Z in response timestamp
plugins/yubikey/corelib.php
--- a/plugins/yubikey/corelib.php	Sat May 16 18:17:09 2009 -0400
+++ b/plugins/yubikey/corelib.php	Sat May 16 18:24:45 2009 -0400
@@ -218,7 +218,7 @@
 
 function yk_strtotime($timestamp)
 {
-  if ( !preg_match('/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z[0-9]+)$/', $timestamp, $match) )
+  if ( !preg_match('/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z[0-9]+)?$/', $timestamp, $match) )
     return 0;
   
   $hour = intval($match[4]);