You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The php_memcached.c php_memc_*_impl() functions perform the below check, which is correct in non-binary mode, but incorrect in binary mode:
if (key_len == 0 || strchr(key, ' ')) {
i_obj->rescode = MEMCACHED_BAD_KEY_PROVIDED;
RETURN_FALSE;
}
In binary mode, spaces are allowed in keys, so the strchr call should be skipped.
Also to be completely correct for non-binary mode, I guess it should check for any whitespace character (tab, etc.; not just space). I do not care about this last point for my current purposes though.
The text was updated successfully, but these errors were encountered:
The php_memcached.c php_memc_*_impl() functions perform the below check, which is correct in non-binary mode, but incorrect in binary mode:
if (key_len == 0 || strchr(key, ' ')) {
i_obj->rescode = MEMCACHED_BAD_KEY_PROVIDED;
RETURN_FALSE;
}
In binary mode, spaces are allowed in keys, so the strchr call should be skipped.
Also to be completely correct for non-binary mode, I guess it should check for any whitespace character (tab, etc.; not just space). I do not care about this last point for my current purposes though.
The text was updated successfully, but these errors were encountered: