Skip to content

Commit 3c78ad7

Browse files
author
Ilia Alshanetsky
committed
Fixed handling of session variable serialization on certain prefix characters. Reported by Stefan Esser
1 parent 78f43a5 commit 3c78ad7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/session/session.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ PS_SERIALIZER_ENCODE_FUNC(php) /* {{{ */
770770

771771
PS_ENCODE_LOOP(
772772
smart_str_appendl(&buf, key, key_length);
773-
if (memchr(key, PS_DELIMITER, key_length)) {
773+
if (memchr(key, PS_DELIMITER, key_length) || memchr(key, PS_UNDEF_MARKER, key_length)) {
774774
PHP_VAR_SERIALIZE_DESTROY(var_hash);
775775
smart_str_free(&buf);
776776
return FAILURE;

0 commit comments

Comments
 (0)