summaryrefslogtreecommitdiff
path: root/auto_prepend.php
diff options
context:
space:
mode:
Diffstat (limited to 'auto_prepend.php')
-rw-r--r--auto_prepend.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/auto_prepend.php b/auto_prepend.php
index 7d13289..192c743 100644
--- a/auto_prepend.php
+++ b/auto_prepend.php
@@ -149,4 +149,18 @@ function db_version()
return in_array("db4", dba_handlers()) ? "db4" : "db2";
}
+/**
+ * Experimental PHP taint support, see ftp://ftp.porcupine.org/pub/php/
+ */
+if (function_exists("taint"))
+{
+ function it_untaint(&$value, $marks = TC_HTML) { untaint($value, $marks); return $value; }
+ function it_taintcheck(&$value, $marks = TC_HTML) { if (istainted($value) & $marks) { untaint($value, $marks); it::error("it_taintcheck($value, $marks) failed"); } return $value; }
+}
+else
+{
+ function it_untaint(&$value, $marks = 0) { return $value; }
+ function it_taintcheck(&$value, $marks = 0) { }
+}
+
?>