MDL-20901 fixed input validation

This commit is contained in:
Petr Skoda
2009-11-20 08:33:33 +00:00
parent a19dffc021
commit c2dcbfe3a6
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -30,7 +30,7 @@
// Make sure this is a legitimate posting
if (!$formdata = data_submitted()) {
if (!$formdata = data_submitted() or !confirm_sesskey()) {
print_error('cannotcallscript');
}
+1
View File
@@ -135,6 +135,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()."\" />";
echo $OUTPUT->box(format_module_intro('survey', $survey, $cm->id), 'generalbox boxaligncenter bowidthnormal', 'intro');