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:
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;
}