Created
May 29, 2009 10:25
-
-
Save klette/119882 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$untaint = new Untainter(); | |
class MyImageUntainter { | |
function validate($data){ | |
return check_for_valid_image_data($data); | |
} | |
} | |
$id = $untaint::check('id', $_GET['id'], $untaint::UINT); | |
$time = $untaint::check('time', $_POST['date'], $untaint::DATETIME); | |
$images[] = $untaint::check_array('images', $_FILES['images[]'], new MyImageUntainter()); | |
if ($untaint::errors()){ | |
foreach ($untaint::errors() as $error) { | |
print "Field " . $error->field . " did not validate"; | |
print " Value: " . $error->value; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment