equal
deleted
inserted
replaced
199 function yubikey_verify_timestamp($timestamp) |
199 function yubikey_verify_timestamp($timestamp) |
200 { |
200 { |
201 $tolerance = intval(getConfig('yubikey_api_ts_tolerance', 150)); |
201 $tolerance = intval(getConfig('yubikey_api_ts_tolerance', 150)); |
202 |
202 |
203 $now = time(); |
203 $now = time(); |
204 $timestamp = preg_replace('/Z[0-9]{3}$/', '', $timestamp); |
204 $timestamp = preg_replace('/Z[0-9]{3,5}$/', '', $timestamp); |
205 $timestamp_seconds = strtotime($timestamp); |
205 $timestamp_seconds = strtotime($timestamp); |
206 |
206 |
207 if ( !$timestamp || !$now ) |
207 if ( !$timestamp || !$now ) |
208 { |
208 { |
209 return false; |
209 return false; |