From b80683f2d8467634bc77ce04ee0d0f8b1de02212 Mon Sep 17 00:00:00 2001 From: marcus Date: Fri, 10 Apr 2009 12:03:00 +0000 Subject: Rolled token into url and confirmlink git-svn-id: https://code.elgg.org/elgg/trunk@3203 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/output/url.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'views/default/output/url.php') diff --git a/views/default/output/url.php b/views/default/output/url.php index 07b5622bf..454b7fc70 100644 --- a/views/default/output/url.php +++ b/views/default/output/url.php @@ -19,7 +19,18 @@ if (!empty($val)) { if ((substr_count($val, "http://") == 0) && (substr_count($val, "https://") == 0)) { $val = "http://" . $val; - } + } + + if ($vars['is_action']) + { + $ts = time(); + $token = generate_action_token($ts); + + $sep = "?"; + if (strpos($val, '?')>0) $sep = "&"; + $val = "$val{$sep}__elgg_token=$token&__elgg_ts=$ts"; + } + echo "". htmlentities($val, ENT_QUOTES, 'UTF-8'). ""; } -- cgit v1.2.3