MDL-20901 fixed input validation

This commit is contained in:
Petr Skoda
2009-11-20 08:34:14 +00:00
parent ac5058208b
commit 135765992f
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
// Make sure this is a legitimate posting
if (!$formdata = data_submitted("$CFG->wwwroot/mod/survey/view.php")) {
if (!$formdata = data_submitted("$CFG->wwwroot/mod/survey/view.php") or !confirm_sesskey()) {
error("You are not supposed to use this script like that.");
}
+1
View File
@@ -111,6 +111,7 @@
echo "<form method=\"post\" action=\"save.php\" id=\"surveyform\">";
echo '<div>';
echo "<input type=\"hidden\" name=\"id\" value=\"$id\" />";
echo "<input type=\"hidden\" name=\"sesskey\" value=\"".sesskey()."\" />";
print_simple_box(format_text($survey->intro), 'center', '70%', '', 5, 'generalbox', 'intro');