|
@@ -2,12 +2,13 @@
|
|
|
namespace components;
|
|
|
|
|
|
use Yii;
|
|
|
+use yii\base\Component;
|
|
|
|
|
|
|
|
|
* Class Secret
|
|
|
* @package components
|
|
|
*/
|
|
|
-class Secret
|
|
|
+class Secret extends Component
|
|
|
{
|
|
|
public $showErrorInfo = true;
|
|
|
|
|
@@ -101,7 +102,9 @@ class Secret
|
|
|
return false;
|
|
|
|
|
|
ksort($post);
|
|
|
- $this->_contentMd5 = md5(json_encode($post));
|
|
|
+ $k = array_keys($post);
|
|
|
+ $s = $k ? implode('&', $k) : '';
|
|
|
+ $this->_contentMd5 = md5($s);
|
|
|
if ( strtolower($md5) != strtolower($this->_contentMd5))
|
|
|
return false;
|
|
|
|