Fixed handling of session variable serialization on certain prefix characters. Reported by Stefan Esser

This commit is contained in:
Ilia Alshanetsky 2010-04-26 18:35:54 +00:00
parent 78f43a53f7
commit 3c78ad763e

View file

@ -770,7 +770,7 @@ PS_SERIALIZER_ENCODE_FUNC(php) /* {{{ */
PS_ENCODE_LOOP(
smart_str_appendl(&buf, key, key_length);
if (memchr(key, PS_DELIMITER, key_length)) {
if (memchr(key, PS_DELIMITER, key_length) || memchr(key, PS_UNDEF_MARKER, key_length)) {
PHP_VAR_SERIALIZE_DESTROY(var_hash);
smart_str_free(&buf);
return FAILURE;