diff --git a/common.php b/common.php index 5261b6f..c9d7f63 100644 --- a/common.php +++ b/common.php @@ -457,7 +457,10 @@ function compareadminmd5($admincookie, $name, $pass) function compareadminsha1($adminsha1, $timestamp, $pass) { if (!is_numeric($timestamp)) return 'Timestamp not Number'; - if (abs(time()-$timestamp) > 5*60) return 'The timestamp in server is ' . time() . ' (' . date("Y-m-d\TH:i:s\Z") . '),
and your posted timestamp is ' . $timestamp . ' (' . date("Y-m-d\TH:i:s\Z", $timestamp) . ')'; + if (abs(time()-$timestamp) > 5*60) { + date_default_timezone_set('UTC'); + return 'The timestamp in server is ' . time() . ' (' . date("Y-m-d\TH:i:s\Z") . '),
and your posted timestamp is ' . $timestamp . ' (' . date("Y-m-d\TH:i:s\Z", $timestamp) . ')'; + } if ($adminsha1 == sha1($timestamp . $pass)) return ''; else return 'Error password'; } @@ -899,18 +902,23 @@ function adminform($name = '', $pass = '', $path = '') '; $html .= ' - '; + +'; $html .= ''; return output($html, $statusCode); } @@ -1406,7 +1414,7 @@ function EnvOpt($needUpdate = 0) } } $html .= ' - +