3 ms·
IMHO this is the direct result of conflating arrays/list and hashes/dictionaries into a single thing on the programming language level. Sure, careful programmi
by perlgeek 12y ago
IMHO this is the direct result of conflating arrays/list and hashes/dictionaries into a single thing on the programming language level.
Sure, careful programming would have avoided that, but if the two concept were fundamentally different types, this bug would be impossible.
- benmmurphy 12y agoruby and perl web frameworks have had similar problems when receiving data it could be an array or a hash or a string and people assumed it was string but in the other cases it would cause sql injection or weird behaviour.
- danielweber 12y agoThe ability to take in arrays as request variables where users don't expect them is a giant headache with PHP.
- oneeyedpigeon 12y agoSurely you should only foreach() if you're working with a hash/map? Would a classic for($c=0, $l=count($arr); $c<$l; $c++) suffer from any similarly-exploitable problem?