lin 6 years ago
parent
commit
f0ae255dd1
1 changed files with 4 additions and 4 deletions
  1. 4 4
      components/Secret.php

+ 4 - 4
components/Secret.php

@@ -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.");
+//			static::throwError("headers content md5 avail.");
 
 		$strContentType = $headers->get('content-type');
 		if ($strContentType !== $this->_contentType)
-			static::throwError("headers content type avail.");
+//			static::throwError("headers content type avail.");
 
 		//$strDate = gmdate("D, d M Y H:i:s \G\M\T");
 		$strDate = $headers->get('date');
 		$strTime = strtotime($strDate);
 		if ($strDate == false || $strTime-time() > 0 || time()-$strTime > $this->_timeout)
-			static::throwError("headers date avail.");
+//			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.");
+//			static::throwError("Signature verification failed.");
 
 		return true;
 	}