summaryrefslogtreecommitdiff
path: root/src/sp_crypt.c
diff options
context:
space:
mode:
authorBen Fuhrmannek2021-09-03 13:25:33 +0200
committerBen Fuhrmannek2021-09-03 13:25:33 +0200
commit2e4fda2c67ce98c9be9092effe2522c1de9f7efc (patch)
tree334d38d09c70220db4c2b3f6fd442638d305d3a7 /src/sp_crypt.c
parent6900dbd5573d7ddb04c2ccb59a4aefca841e124b (diff)
fixed session encryption in php8 + related test cases
Diffstat (limited to 'src/sp_crypt.c')
-rw-r--r--src/sp_crypt.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/sp_crypt.c b/src/sp_crypt.c
index eeffe33..ff8f65e 100644
--- a/src/sp_crypt.c
+++ b/src/sp_crypt.c
@@ -43,8 +43,7 @@ int decrypt_zval(zval *pDest, bool simulation, zend_hash_key *hash_key) {
43 unsigned char *decrypted = NULL, *backup = NULL; 43 unsigned char *decrypted = NULL, *backup = NULL;
44 int ret = 0; 44 int ret = 0;
45 45
46 zend_string *debase64 = php_base64_decode((unsigned char *)(Z_STRVAL_P(pDest)), 46 zend_string *debase64 = php_base64_decode((unsigned char *)(Z_STRVAL_P(pDest)), Z_STRLEN_P(pDest));
47 Z_STRLEN_P(pDest));
48 47
49 if (ZSTR_LEN(debase64) < crypto_secretbox_NONCEBYTES) { 48 if (ZSTR_LEN(debase64) < crypto_secretbox_NONCEBYTES) {
50 if (true == simulation) { 49 if (true == simulation) {