summaryrefslogtreecommitdiff
path: root/actions/showstream.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-08-29 01:11:04 -0400
committerEvan Prodromou <evan@prodromou.name>2008-08-29 01:11:04 -0400
commit4272da4e9e2ab9c99b4b9897f04c92cd7987cb8b (patch)
tree9b8d1b5a3cd04934f12035cd6e414e21f08fe2c5 /actions/showstream.php
parent2e239e3fbb4b8b8bc837f32ee750c9cbf266f246 (diff)
CSRF protection for subscription/unsubscription
darcs-hash:20080829051104-84dde-9bd23c28c2c8a720046060a33ff3e5f246c47116.gz
Diffstat (limited to 'actions/showstream.php')
-rw-r--r--actions/showstream.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/actions/showstream.php b/actions/showstream.php
index 29ff58a59..7b41b8514 100644
--- a/actions/showstream.php
+++ b/actions/showstream.php
@@ -179,6 +179,7 @@ class ShowstreamAction extends StreamAction {
function show_subscribe_form($profile) {
common_element_start('form', array('id' => 'subscribe', 'method' => 'post',
'action' => common_local_url('subscribe')));
+ common_hidden('token', common_session_token());
common_element('input', array('id' => 'subscribeto',
'name' => 'subscribeto',
'type' => 'hidden',
@@ -200,6 +201,7 @@ class ShowstreamAction extends StreamAction {
function show_unsubscribe_form($profile) {
common_element_start('form', array('id' => 'unsubscribe', 'method' => 'post',
'action' => common_local_url('unsubscribe')));
+ common_hidden('token', common_session_token());
common_element('input', array('id' => 'unsubscribeto',
'name' => 'unsubscribeto',
'type' => 'hidden',