diff options
Diffstat (limited to 'src/sp_cookie_encryption.c')
| -rw-r--r-- | src/sp_cookie_encryption.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sp_cookie_encryption.c b/src/sp_cookie_encryption.c index 0c14c70..7b3e088 100644 --- a/src/sp_cookie_encryption.c +++ b/src/sp_cookie_encryption.c | |||
| @@ -31,6 +31,11 @@ int decrypt_cookie(zval *pDest, int num_args, va_list args, | |||
| 31 | return ZEND_HASH_APPLY_KEEP; | 31 | return ZEND_HASH_APPLY_KEEP; |
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | /* Cookies can be arrays, like session_id[]=x */ | ||
| 35 | if (Z_TYPE_P(pDest) != IS_STRING) { | ||
| 36 | return ZEND_HASH_APPLY_KEEP; | ||
| 37 | } | ||
| 38 | |||
| 34 | /* If the cookie has no value, it shouldn't be encrypted. */ | 39 | /* If the cookie has no value, it shouldn't be encrypted. */ |
| 35 | if (0 == Z_STRLEN_P(pDest)) { | 40 | if (0 == Z_STRLEN_P(pDest)) { |
| 36 | return ZEND_HASH_APPLY_KEEP; | 41 | return ZEND_HASH_APPLY_KEEP; |
