Skip to content

Commit

Permalink
MDL-20901 fixed input validation
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Nov 20, 2009
1 parent c2dcbfe commit dba386b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions mod/glossary/import.html
Expand Up @@ -46,6 +46,7 @@
</table>
<div>
<input type="hidden" name="id" value="<?php p($id) ?>" />
<input type="hidden" name="sesskey" value="<?php echo sesskey() ?>" />
<input type="hidden" name="step" value="1" />
</div>
</form>
1 change: 1 addition & 0 deletions mod/glossary/import.php
Expand Up @@ -82,6 +82,7 @@
exit;
}

require_sesskey();
$form = data_submitted();
$file = $_FILES["file"];

Expand Down
2 changes: 1 addition & 1 deletion mod/glossary/rate.php
Expand Up @@ -46,7 +46,7 @@
$returnurl = $CFG->wwwroot.'/mod/glossary/view.php?id='.$cm->id;
}

if ($data = data_submitted()) { // form submitted
if ($data = data_submitted() and confirm_sesskey()) { // form submitted

/// Calculate scale values
$scale_values = make_grades_menu($glossary->scale);
Expand Down
1 change: 1 addition & 0 deletions mod/glossary/view.php
Expand Up @@ -417,6 +417,7 @@
echo "<form method=\"post\" action=\"rate.php\">";
echo "<div>";
echo "<input type=\"hidden\" name=\"glossaryid\" value=\"$glossary->id\" />";
echo "<input type=\"hidden\" name=\"sesskey\" value=\"".sesskey()."\" />";
}

foreach ($allentries as $entry) {
Expand Down

0 comments on commit dba386b

Please sign in to comment.