use more graceful check function to verify key existence
[curl-de-sac.git] / web / Obj / curl-de-brisk.phh
index 5c23651..a78b3fc 100755 (executable)
@@ -37,12 +37,12 @@ function brisk_cds_reload($brisk)
     return (TRUE);
 }
 
-function brisk_cds_execute($brisk, $real_idx, $sess, $ip, $authenticate)
+function brisk_cds_execute($brisk, $ghost, $real_idx, $sess, $ip, $authenticate, $header)
 {
-    if ($brisk->cds->execute("tor_chk", $brisk, $ghost, $sess, $ip, $authenticate != FALSE) == FALSE) {
+    if ($brisk->cds->execute("tor_chk", $brisk, $ghost, $sess, $ip, $authenticate != FALSE, $header) == FALSE) {
         log_main("cds_execute failed");
     }
-    if ($brisk->cds->execute("proxy_chk", $brisk, $ghost, $sess, $ip, $authenticate != FALSE) == FALSE) {
+    if ($brisk->cds->execute("proxy_chk", $brisk, $ghost, $sess, $ip, $authenticate != FALSE, $header) == FALSE) {
         log_main("cds_execute failed");
     }
 }
@@ -190,7 +190,7 @@ class Proxy_chk_cmd_cls extends CDS_cmd_cls {
 
         foreach($this->scan_headers as $key){
             //proxy detected? lets log...
-            if($headers[$key]) {
+            if(array_key_exists($key, $headers)) {
                 // we already are behind a PROXY, this are our headers
                 if ($key == 'X-Proxy-ID') {
                     if ($headers[$key] == '860705422')