protected function _before_write(&$data) { if (!isset($_SESSION['ADMIN_ID']) || isset($_SESSION['ADMIN_ID']) && $_SESSION['roleid'] != 1) { foreach ($data as $key => $d) { $data[$key] = hh($d); } } }
function hh2($m, $n) { $r = zz("tainted call from untainted context1"); echo "hh2: {$r}\n"; $a = "tainted call from untainted context2"; $b = "tainted call from untainted context3"; $r = zz2($a, $b); echo "hh2: {$r}\n"; return hh($m, $n); }
function hh(&$array) { if (!is_array($array)) { if (is_object($array)) { return array(); } return h($array); } else { $newArray = array(); foreach ($array as $key => $value) { if ($key[0] == '&') { $newArray[$key] = $value; } else { $newArray[$key] = hh($value); } } return $newArray; } }