diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2013-11-28 02:26:51 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2013-11-28 02:26:51 +0400 |
commit | e71d5d6a444fbe3ddf9214d8a7a0b1fa94caba51 (patch) | |
tree | 989bb484d3204d44a20f64896dedf8f9a9583412 /core | |
parent | f8ebccd8bde22a41b9749bc879d6f6c774ed212c (diff) |
refs #4338 extend lifetime if nonce is requested again to prevent from early timeout if nonce is requested a few seconds before timeout
Diffstat (limited to 'core')
-rw-r--r-- | core/Nonce.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/Nonce.php b/core/Nonce.php index f9a5fe4f5e..f05e8ab542 100644 --- a/core/Nonce.php +++ b/core/Nonce.php @@ -48,9 +48,12 @@ class Nonce // generate a new nonce $nonce = md5(SettingsPiwik::getSalt() . time() . Common::generateUniqId()); $ns->nonce = $nonce; - $ns->setExpirationSeconds($ttl, 'nonce'); } + // extend lifetime if nonce is requested again to prevent from early timeout if nonce is requested again + // a few seconds before timeout + $ns->setExpirationSeconds($ttl, 'nonce'); + return $nonce; } |