diff options
author | Sergey Linnik <sergey.linnik@onlyoffice.com> | 2019-12-03 17:41:55 +0300 |
---|---|---|
committer | Sergey Linnik <sergey.linnik@onlyoffice.com> | 2019-12-06 15:02:47 +0300 |
commit | 6315347bff641f7b17d1bdaeffebe742a6991e77 (patch) | |
tree | a04651a8dae8af1f1df59077bcaa53bef6cd5369 /lib/directeditor.php | |
parent | 762c96df4e902b496371b852cdae554b0ab317e6 (diff) |
expiration directToken
Diffstat (limited to 'lib/directeditor.php')
-rw-r--r-- | lib/directeditor.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/directeditor.php b/lib/directeditor.php index b350a0b..b9bcd7e 100644 --- a/lib/directeditor.php +++ b/lib/directeditor.php @@ -207,7 +207,13 @@ class DirectEditor implements IEditor { return $this->renderError($this->trans->t("ONLYOFFICE app is not configured. Please contact admin")); } - $directToken = $this->crypt->GetHash(["userId" => $userId, "fileId" => $fileId, "action" => "direct"]); + $directToken = $this->crypt->GetHash([ + "userId" => $userId, + "fileId" => $fileId, + "action" => "direct", + "iat" => time(), + "exp" => time() + 30 + ]); $params = [ "documentServerUrl" => $documentServerUrl, |