diff options
Diffstat (limited to 'core/Nonce.php')
-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; } |