diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-01-24 16:43:29 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-01-24 16:43:29 +0000 |
commit | 728ac2daaeaa95098aa189c03dd908eaa674a3c7 (patch) | |
tree | 6b34b9618a54e017862cd80e6723d906366c2e01 /views/failsafe/input/securitytoken.php | |
parent | 6526a83f52eac96a4c522c041ae5c0bfb24795d8 (diff) | |
download | elgg-728ac2daaeaa95098aa189c03dd908eaa674a3c7.tar.gz elgg-728ac2daaeaa95098aa189c03dd908eaa674a3c7.tar.bz2 |
Refs #1459: Added missing security tokens for failsafe (installation) view.
git-svn-id: http://code.elgg.org/elgg/trunk@3835 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/failsafe/input/securitytoken.php')
-rw-r--r-- | views/failsafe/input/securitytoken.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/views/failsafe/input/securitytoken.php b/views/failsafe/input/securitytoken.php new file mode 100644 index 000000000..a2a4a0e01 --- /dev/null +++ b/views/failsafe/input/securitytoken.php @@ -0,0 +1,17 @@ +<?php +/** + * CSRF security token view for use with secure forms. + * + * It is still recommended that you use input/form. + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + */ + +$ts = time(); +$token = generate_action_token($ts); + +echo elgg_view('input/hidden', array('internalname' => '__elgg_token', 'value' => $token)); +echo elgg_view('input/hidden', array('internalname' => '__elgg_ts', 'value' => $ts)); |