diff options
| -rw-r--r-- | src/sp_crypt.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sp_crypt.c b/src/sp_crypt.c index 6d48554..9d4e6bb 100644 --- a/src/sp_crypt.c +++ b/src/sp_crypt.c | |||
| @@ -42,6 +42,11 @@ int decrypt_zval(zval *pDest, bool simulation, zend_hash_key *hash_key) { | |||
| 42 | 42 | ||
| 43 | zend_string *debase64 = php_base64_decode((unsigned char *)(Z_STRVAL_P(pDest)), Z_STRLEN_P(pDest)); | 43 | zend_string *debase64 = php_base64_decode((unsigned char *)(Z_STRVAL_P(pDest)), Z_STRLEN_P(pDest)); |
| 44 | 44 | ||
| 45 | if (!debase64) { | ||
| 46 | sp_log_drop( "cookie_encryption", "Unable to base64-decode the cookie"); | ||
| 47 | return ZEND_HASH_APPLY_REMOVE; | ||
| 48 | } | ||
| 49 | |||
| 45 | if (ZSTR_LEN(debase64) < crypto_secretbox_NONCEBYTES) { | 50 | if (ZSTR_LEN(debase64) < crypto_secretbox_NONCEBYTES) { |
| 46 | if (true == simulation) { | 51 | if (true == simulation) { |
| 47 | sp_log_simulation( | 52 | sp_log_simulation( |
