* fix bug.

This commit is contained in:
wangyidong
2021-07-21 17:41:43 +08:00
parent f0bb1eb52b
commit 3384f53fa9
2 changed files with 3 additions and 8 deletions
+2 -2
View File
@@ -284,7 +284,7 @@ class baseHelper
$secret = $config->encryptSecret;
if(function_exists('mcrypt_encrypt'))
{
$encrypted = base64_encode(@mcrypt_encrypt(MCRYPT_DES, $secret, $password, MCRYPT_MODE_CBC));
$encrypted = base64_encode(@mcrypt_encrypt(MCRYPT_DES, substr($secret, 0, 8), $password, MCRYPT_MODE_CBC));
}
elseif(function_exists('openssl_encrypt'))
{
@@ -322,7 +322,7 @@ class baseHelper
}
elseif(function_exists('openssl_decrypt'))
{
$decryptedPassword = openssl_decrypt($password, 'DES-CBC', $secret, OPENSSL_ZERO_PADDING);
$decryptedPassword = openssl_decrypt($password, 'DES-CBC', substr($secret, 0, 8), OPENSSL_ZERO_PADDING);
}
/* Check decrypted password. Judge whether there is garbled code. */
+1 -6
View File
@@ -513,12 +513,7 @@ class router extends baseRouter
if($methodName == 'batchOperate') array_unshift($params, $this->rawMethod); // $params = array('close', 1);
if($methodName == 'browse')
{
if(isset($params[0]) and $params[0] == 'bysearch')
{
$params[0] = '';
array_unshift($params, 'bysearch');
}
else
if(!(isset($params[0]) and $params[0] == 'bysearch'))
{
array_unshift($params, 'browse');
}