Skip to content

Commit

Permalink
course/groups.php is using sesskey.
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Oct 9, 2004
1 parent ecea154 commit bccdea5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions course/groups-edit.html
Expand Up @@ -87,6 +87,7 @@
<form name="form1" id="form1" method="post" action="groups.php"> <form name="form1" id="form1" method="post" action="groups.php">
<input type="hidden" name="id" value="<?php p($course->id) ?>" /> <input type="hidden" name="id" value="<?php p($course->id) ?>" />
<input type="hidden" name="groupid" value="<?php p($selectedgroup) ?>" /> <input type="hidden" name="groupid" value="<?php p($selectedgroup) ?>" />
<input type="hidden" name="sesskey" value="<?php p($sesskey) ?>">
<select name="nonmembers[]" size="15" multiple="multiple"> <select name="nonmembers[]" size="15" multiple="multiple">
<?php <?php
if (!empty($nonmembers)) { if (!empty($nonmembers)) {
Expand All @@ -113,6 +114,7 @@
<td class="generalboxcontent"><p> <td class="generalboxcontent"><p>
<form name="form2" id="form2" method="post" action="groups.php"> <form name="form2" id="form2" method="post" action="groups.php">
<input type="hidden" name="id" value="<?php p($course->id) ?>" /> <input type="hidden" name="id" value="<?php p($course->id) ?>" />
<input type="hidden" name="sesskey" value="<?php p($sesskey) ?>">
<select name="groups" size="15" onChange="updateMembers(this)"> <select name="groups" size="15" onChange="updateMembers(this)">
<?php <?php
if (!empty($listgroups)) { if (!empty($listgroups)) {
Expand Down Expand Up @@ -146,6 +148,7 @@
<form name="form3" id="form3" method="post" action="groups.php"> <form name="form3" id="form3" method="post" action="groups.php">
<input type="hidden" name="id" value="<?php p($course->id) ?>" /> <input type="hidden" name="id" value="<?php p($course->id) ?>" />
<input type="hidden" name="groupid" value="<?php p($selectedgroup) ?>" /> <input type="hidden" name="groupid" value="<?php p($selectedgroup) ?>" />
<input type="hidden" name="sesskey" value="<?php p($sesskey) ?>">
<select name="members[]" size="15" multiple="multiple"> <select name="members[]" size="15" multiple="multiple">
<?php <?php
if (!empty($members)) { if (!empty($members)) {
Expand Down
4 changes: 3 additions & 1 deletion course/groups.php
Expand Up @@ -82,7 +82,7 @@


/// We are in editing mode. First, process any inputs there may be. /// We are in editing mode. First, process any inputs there may be.


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


if (!empty($data->nonmembersadd)) { /// Add people to a group if (!empty($data->nonmembersadd)) { /// Add people to a group
if (!empty($data->nonmembers) and !empty($data->groupid)) { if (!empty($data->nonmembers) and !empty($data->groupid)) {
Expand Down Expand Up @@ -219,6 +219,8 @@
$members = $listmembers[$selectedgroup]; $members = $listmembers[$selectedgroup];
} }


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

/// Print out the complete form /// Print out the complete form


include('groups-edit.html'); include('groups-edit.html');
Expand Down

0 comments on commit bccdea5

Please sign in to comment.