cvs: phpweb / submit-event.php
| From: | James Cox | Date: | Thu, 02 May 2002 17:56:24 +0000 |
| Subject: | cvs: phpweb / submit-event.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-10002@lists.php.net to get a copy of this message | ||
imajes Thu May 2 13:56:24 2002 EDT
Modified files:
/phpweb submit-event.php
Log:
more hack protection, *grumble*
Index: phpweb/submit-event.php
diff -u phpweb/submit-event.php:1.7 phpweb/submit-event.php:1.8
--- phpweb/submit-event.php:1.7 Tue Mar 5 14:11:16 2002
+++ phpweb/submit-event.php Thu May 2 13:56:23 2002
@@ -16,6 +16,14 @@
}
# clean and validate data
+
+if (!is_numeric($id) || !is_numeric($cy) || !is_numeric($cd) || !is_numeric($cm)) {
+ $errors[] = "invalid data specified";
+ $hack = 1;
+}
+
+if (!$hack) {
+
if (!is_emailable_address($in['email'])) {
$errors[] = 'You must supply a valid email address.';
}
@@ -85,7 +93,7 @@
exit;
}
}
-
+}
if (!$errors) {?>
<p>The following is a preview of your event submission. Please double-check it
to make sure all of the information is correct.</p>
@@ -99,7 +107,11 @@
<?php
}
-if ($errors) display_errors($errors);
+if ($errors) {
+ display_errors($errors);
+ commonFooter();
+ exit();
+}
for ($i = 1; $i <= 7; $i++) {
$days[$i] = strftime('%A',mktime(12,0,0,4,$i,2001));