Ver código fonte

修复一个低级错误,导致解密失败,无响应

binsee 10 anos atrás
pai
commit
2a7489fb4a
2 arquivos alterados com 2 adições e 2 exclusões
  1. 1 1
      Thinkphp/qywechat.class.php
  2. 1 1
      qywechat.class.php

+ 1 - 1
Thinkphp/qywechat.class.php

@@ -1636,7 +1636,7 @@ class PKCS7Encoder
     {
 
         $pad = ord(substr($text, -1));
-        if ($pad < 1 || $pad > PKCS7Encoder::block_size) {
+        if ($pad < 1 || $pad > PKCS7Encoder::$block_size) {
             $pad = 0;
         }
         return substr($text, 0, (strlen($text) - $pad));

+ 1 - 1
qywechat.class.php

@@ -1627,7 +1627,7 @@ class PKCS7Encoder
     {
 
         $pad = ord(substr($text, -1));
-        if ($pad < 1 || $pad > PKCS7Encoder::block_size) {
+        if ($pad < 1 || $pad > PKCS7Encoder::$block_size) {
             $pad = 0;
         }
         return substr($text, 0, (strlen($text) - $pad));