Exemplo n.º 1
0
function deAspisCallback($var)
{
    /*
     * used by the Library to remove the aspis from a callback. I.e.
     * if an object is referenced, I must not removes all Aspides recursively
     */
    global $ASPIS_INFO_COLLECT;
    if ($ASPIS_INFO_COLLECT) {
        AspisLogExamine($var);
    }
    $res = $var[0];
    if (is_array($res)) {
        //if the callback is on a method on $this, $this would not be protected
        if (is_array($res[0])) {
            $res[0] = $res[0][0];
        }
        $res[1] = $res[1][0];
    }
    return $res;
}
Exemplo n.º 2
0
function AspisCheckPrint($obj)
{
    $ret;
    if ($obj == NULL) {
        return NULL;
    }
    global $ASPIS_INFO_COLLECT;
    if ($ASPIS_INFO_COLLECT) {
        AspisLogExamine($obj);
    }
    if ($obj[1] === false) {
        $ret = $obj[0];
    } else {
        $ret = AspisLibMakeUseXSS($obj[1][0], $obj[0]);
    }
    return $ret;
}