Repository navigation
PHP Judy 2.8.0
Hardening release: several memory-safety fixes, behavior tightening, and strict
__unserialize() validation.
Security fixes
- Appending to a string-keyed array (
$j[] = ...) no longer crashes; the append
guard now enumerates all seven string-keyed types, includingJudy::STRING_TO_ENTRY(#217). forEach()/filter()/map()onSTRING_TO_ENTRYread each value through the
entry accessor instead of reinterpreting a cache-entry struct as azval;
equals()gained a matching ENTRY branch (#217).set()rejects keys longer than the 64 KB key buffer before taking a slot
(heap overflow);deleteRange()on string-keyed ENTRY arrays now frees the
cache-entry struct and its value reference instead of leaking both (#217).
Fixes
- Expired
STRING_TO_ENTRYvalues are hidden from reads and traversals
(iterator,get(),keys()/values()/toArray()) whilecount()/size()
stay raw-counter O(1) untilpruneExpired().mergeWith()copies TTL and
flags verbatim;get_gc()collects stored ENTRY values (#217). - Wrong-category range bounds now throw
TypeErrorinstead of silently coercing
to a wrong-range read: int-keyedkeys()/values()/toArray()/size()/
slice()reject non-numeric string bounds, and string-keyeddeleteRange()
rejects integer bounds (#217). __unserialize()validates the serialized type, payload shape and
optimizeIterationflag strictly before touching the object, so a malformed
payload throws without destroying or corrupting an already-populated array,
and an out-of-range type throws instead of emitting anE_WARNING(#225).
Full diff: v2.7.1...v2.8.0
Install: pecl install judy-2.8.0 · pie install orieg/judy:2.8.0