Re: php at kaiundina dot de (03-Feb-2005 02:18)
1. magic_quotes_gpc=on/off and magic_quotes_sybase=on/off
I made test and your function worked right.
These were the <input ... /> names I used:
name="a"
name="b.b b\b"
name="c[c.1]"
name="c[c 2]"
name="c[c\3]"
name="c.c c[c.' 4]"
name="c ' c[c"4]"
name="d"[d"1]"
(I used " because I don't know other way to put " into the name)
and the user-input value:
a ' " \ \' \" \\ a
2. > 17) The chars '.', ' ' are always replaced by '_' when used in keys.
This is true only for the top-level keys, such as "b.b b\b", "c.c c" and "c ' c" above. The second-level key "[c.' 4]" was not changed to [c_'_4] but was escaped acording to how magic_quites_XXX are set.
Tested on PHP 4.4.0.
These magic_quotes are really black magic :(
It'll be good to make test against $_SESSION, but I can't do it today.