From 31ae28f30652e4dc67a5fe350f922289d14d5e37 Mon Sep 17 00:00:00 2001 From: marcus Date: Wed, 24 Sep 2008 16:26:47 +0000 Subject: Added action_gatekeeper() code git-svn-id: https://code.elgg.org/elgg/trunk@2117 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/apiadmin/views/default/object/api_key.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'mod/apiadmin/views') diff --git a/mod/apiadmin/views/default/object/api_key.php b/mod/apiadmin/views/default/object/api_key.php index fdfe9af54..26d452be5 100644 --- a/mod/apiadmin/views/default/object/api_key.php +++ b/mod/apiadmin/views/default/object/api_key.php @@ -14,9 +14,12 @@ $public_label = elgg_echo('apiadmin:public'); $private_label = elgg_echo('apiadmin:private'); $revoke_label = elgg_echo('apiadmin:revoke'); + + $ts = time(); + $token = generate_action_token($ts); - $info = "

{$entity->title} url}actions/apiadmin/revokekey?keyid={$entity->guid}\">$revoke_label

"; + $info = "

{$entity->title} url}actions/apiadmin/revokekey?keyid={$entity->guid}&__elgg_token=$token&__elgg_ts=$ts\">$revoke_label

"; $info .= "

$public_label: {$entity->public}
"; if (isadminloggedin()) { // Only show secret portion to admins -- cgit v1.2.3