summaryrefslogtreecommitdiffstats
path: root/web/template
diff options
context:
space:
mode:
Diffstat (limited to 'web/template')
-rw-r--r--web/template/actions_form.php1
-rw-r--r--web/template/pkg_comment_form.php5
-rw-r--r--web/template/pkg_comments.php1
-rw-r--r--web/template/pkg_details.php3
-rw-r--r--web/template/pkg_search_results.php1
-rw-r--r--web/template/tu_details.php1
6 files changed, 10 insertions, 2 deletions
diff --git a/web/template/actions_form.php b/web/template/actions_form.php
index 68d83d7..fa6ad72 100644
--- a/web/template/actions_form.php
+++ b/web/template/actions_form.php
@@ -3,6 +3,7 @@
<fieldset>
<input type='hidden' name='IDs[<?php echo $row['ID'] ?>]' value='1' />
<input type='hidden' name='ID' value="<?php echo $row['ID'] ?>" />
+ <input type='hidden' name='token' value="<?php echo htmlspecialchars($_COOKIE['AURSID']) ?>" />
<?php
# Voting Button
#
diff --git a/web/template/pkg_comment_form.php b/web/template/pkg_comment_form.php
index d3b602c..6081643 100644
--- a/web/template/pkg_comment_form.php
+++ b/web/template/pkg_comment_form.php
@@ -1,6 +1,6 @@
<?php
# Add a comment to this package
-if (isset($_REQUEST['comment'])) {
+if (isset($_REQUEST['comment']) && check_token()) {
# Insert the comment
$dbh = db_connect();
@@ -53,13 +53,14 @@ if (isset($_REQUEST['comment'])) {
<form action='<?php echo $_SERVER['REQUEST_URI'] ?>' method='post'>
<div style="padding: 1%">
<?php
-if (isset($_REQUEST['comment'])) {
+if (isset($_REQUEST['comment']) && check_token()) {
echo '<b>' . __('Comment has been added.') . '</b>';
}
?>
<input type='hidden' name='ID' value="<?php echo intval($_REQUEST['ID']) ?>" />
<?php echo __('Enter your comment below.') ?><br />
<textarea name='comment' cols='80' rows='10' style="width: 100%"></textarea><br />
+ <input type='hidden' name='token' value='<?php echo htmlspecialchars($_COOKIE['AURSID']) ?>' />
<input type='submit' value="<?php echo __("Submit") ?>" />
<input type='reset' value="<?php echo __("Reset") ?>" />
</div>
diff --git a/web/template/pkg_comments.php b/web/template/pkg_comments.php
index aed9ca8..9dd5004 100644
--- a/web/template/pkg_comments.php
+++ b/web/template/pkg_comments.php
@@ -15,6 +15,7 @@ while (list($indx, $carr) = each($comments)) { ?>
$durl.= '<fieldset style="display:inline;">';
$durl.= '<input type="hidden" name="action" value="do_DeleteComment" />';
$durl.= '<input type="hidden" name="comment_id" value="'.$carr['ID'].'" />';
+ $durl.= '<input type="hidden" name="token" value="'.htmlspecialchars($_COOKIE['AURSID']).'" />';
$durl.= '<input type="image" src="images/x.png" ';
$durl.= ' alt="'.__("Delete comment").'" name="submit" value="1" ';
$durl.= ' />&nbsp;';
diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php
index 046f836..193af84 100644
--- a/web/template/pkg_details.php
+++ b/web/template/pkg_details.php
@@ -10,6 +10,9 @@ if ($uid == $row["MaintainerUID"] or
$edit_cat = "<form method='post' action='packages.php?ID=".$pkgid."'>\n";
$edit_cat.= "<p>";
$edit_cat.= "<input type='hidden' name='action' value='do_ChangeCategory' />";
+ if ($SID) {
+ $edit_cat.= "<input type='hidden' name='token' value='".htmlspecialchars($_COOKIE['AURSID'])."' />";
+ }
$edit_cat.= "<span class='f3'>" . __("Category") . ":</span> ";
$edit_cat.= "<select name='category_id'>\n";
foreach ($catarr as $cid => $catname) {
diff --git a/web/template/pkg_search_results.php b/web/template/pkg_search_results.php
index e576e6e..609dc19 100644
--- a/web/template/pkg_search_results.php
+++ b/web/template/pkg_search_results.php
@@ -114,6 +114,7 @@ for ($i = 0; $row = mysql_fetch_assoc($result); $i++) {
<input type='text' id='merge_Into' name='merge_Into' />
<input type='checkbox' name='confirm_Delete' value='1' /> <?php print __("Confirm") ?>
<?php endif; ?>
+ <input type='hidden' name='token' value='<?php print htmlspecialchars($_COOKIE['AURSID']) ?>' />
<input type='submit' class='button' style='width: 80px' value='<?php print __("Go") ?>' />
</div>
<?php endif; # if ($SID) ?>
diff --git a/web/template/tu_details.php b/web/template/tu_details.php
index 7d6c305..dde53a8 100644
--- a/web/template/tu_details.php
+++ b/web/template/tu_details.php
@@ -70,6 +70,7 @@ if (!$isrunning) { ?>
<input type='submit' class='button' name='voteNo' value='<?php print __("No") ?>' />
<input type='submit' class='button' name='voteAbstain' value='<?php print __("Abstain") ?>' />
<input type='hidden' name='doVote' value='1' />
+<input type='hidden' name='token' value='<?php print htmlspecialchars($_COOKIE['AURSID']) ?>' />
</fieldset>
</form>
<?php } else { ?>