From: Evan Prodromou Date: Mon, 11 Jul 2011 16:40:28 +0000 (-0400) Subject: Memcached_DataObject::pkeyGet() accepts null values X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5c963cb3b704e5fdb82c218c2ddfc2c076e4fe68;p=quix0rs-gnu-social.git Memcached_DataObject::pkeyGet() accepts null values --- diff --git a/classes/Memcached_DataObject.php b/classes/Memcached_DataObject.php index c361ba8783..0e60b7fed5 100644 --- a/classes/Memcached_DataObject.php +++ b/classes/Memcached_DataObject.php @@ -78,7 +78,13 @@ class Memcached_DataObject extends Safe_DataObject return false; } foreach ($kv as $k => $v) { - $i->$k = $v; + if (is_null($v)) { + // XXX: possible SQL injection...? Don't + // pass keys from the browser, eh. + $i->whereAdd("$k is null"); + } else { + $i->$k = $v; + } } if ($i->find(true)) { $i->encache();