Permalink
Browse files

MDL-20901 fixed input validation

  • Loading branch information...
1 parent ac50582 commit 135765992f8600eeca91aad89a720dcb985fdbca @skodak skodak committed Nov 20, 2009
Showing with 2 additions and 1 deletion.
  1. +1 −1 mod/survey/save.php
  2. +1 −0 mod/survey/view.php
View
@@ -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.");
}
View
@@ -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');

0 comments on commit 1357659

Please sign in to comment.