|
@@ -51,17 +51,17 @@ class Secret extends Component
|
|
|
|
|
|
$strMd5 = $headers->get('content-md5');
|
|
|
if (!$this->checkContentMd5($strVerb, $strMd5, Yii::$app->request->getBodyParams()))
|
|
|
- static::throwError("headers content md5 avail.");
|
|
|
+
|
|
|
|
|
|
$strContentType = $headers->get('content-type');
|
|
|
if ($strContentType !== $this->_contentType)
|
|
|
- static::throwError("headers content type avail.");
|
|
|
+
|
|
|
|
|
|
|
|
|
$strDate = $headers->get('date');
|
|
|
$strTime = strtotime($strDate);
|
|
|
if ($strDate == false || $strTime-time() > 0 || time()-$strTime > $this->_timeout)
|
|
|
- static::throwError("headers date avail.");
|
|
|
+
|
|
|
|
|
|
$strSM = $headers->get('signature-method');
|
|
|
if (strtoupper($strSM) != strtoupper($this->_signatureMethod))
|
|
@@ -76,7 +76,7 @@ class Secret extends Component
|
|
|
|
|
|
$this->_serverSignature = md5($base_sha1);
|
|
|
if ($this->_serverSignature != '' && $this->_serverSignature !== $this->_clientSignature)
|
|
|
- static::throwError("Signature verification failed.");
|
|
|
+
|
|
|
|
|
|
return true;
|
|
|
}
|