Skip to content

Commit

Permalink
course/editsection.php is using sesskey.
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Oct 8, 2004
1 parent 58b9565 commit ac63a3f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions course/editsection.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
</tr>
</table>
<input type="hidden" name=id value="<?php echo $form->id ?>">
<input type="hidden" name=sesskey value="<?php echo $form->sesskey ?>">
<input type="submit" value="<?php print_string("savechanges") ?>">
</form>
</center>
4 changes: 3 additions & 1 deletion course/editsection.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

/// If data submitted, then process and store.

if ($form = data_submitted()) {
if ($form = data_submitted() and confirm_sesskey()) {

$timenow = time();

Expand All @@ -43,6 +43,8 @@
$form = $section;
}

$form->sesskey = !empty($USER->id) ? $USER->sesskey : '';

$usehtmleditor = can_use_html_editor();

$sectionname = get_string("name$course->format");
Expand Down

0 comments on commit ac63a3f

Please sign in to comment.