Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@gmail.com>2013-11-28 02:26:51 +0400
committerThomas Steur <thomas.steur@gmail.com>2013-11-28 02:26:51 +0400
commite71d5d6a444fbe3ddf9214d8a7a0b1fa94caba51 (patch)
tree989bb484d3204d44a20f64896dedf8f9a9583412 /core/Nonce.php
parentf8ebccd8bde22a41b9749bc879d6f6c774ed212c (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/Nonce.php')
-rw-r--r--core/Nonce.php5
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;
}