diff options
| author | Angus Johnston | 2025-12-05 13:57:32 +0000 |
|---|---|---|
| committer | Julien Voisin | 2025-12-05 15:59:24 +0100 |
| commit | e586b7df4e575d7d5e017b4134bdac9b297b667b (patch) | |
| tree | d0bd0bf5fbb5ae6135647989b6400a958277c391 /src/sp_cookie_encryption.c | |
| parent | ea53f247a64f0702e983c0ce98ba7655ca7762a8 (diff) | |
Fix url_encode cookie flag in php_setcookie call
setcookie() is always URL encoded, urlencode is only turned off for setrawcookie().
Turning it off breaks cookies that have a value containing certain characters (namely spaces)
https://github.com/php/php-src/blob/685e99655ae97c667950f7f7d176985958718f56/ext/standard/head.c#L97
Diffstat (limited to 'src/sp_cookie_encryption.c')
| -rw-r--r-- | src/sp_cookie_encryption.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sp_cookie_encryption.c b/src/sp_cookie_encryption.c index 888d217..0c14c70 100644 --- a/src/sp_cookie_encryption.c +++ b/src/sp_cookie_encryption.c | |||
| @@ -218,7 +218,7 @@ PHP_FUNCTION(sp_setcookie) { | |||
| 218 | partitioned = false; | 218 | partitioned = false; |
| 219 | } | 219 | } |
| 220 | if (php_setcookie(name, (value_enc ? value_enc : value), expires, path, | 220 | if (php_setcookie(name, (value_enc ? value_enc : value), expires, path, |
| 221 | domain, secure, httponly, samesite, partitioned, false) == SUCCESS) { | 221 | domain, secure, httponly, samesite, partitioned, 1) == SUCCESS) { |
| 222 | #endif | 222 | #endif |
| 223 | RETVAL_TRUE; | 223 | RETVAL_TRUE; |
| 224 | } else { | 224 | } else { |
