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

github.com/ONLYOFFICE/onlyoffice-nextcloud.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Linnik <sergey.linnik@onlyoffice.com>2019-12-03 17:41:55 +0300
committerSergey Linnik <sergey.linnik@onlyoffice.com>2019-12-06 15:02:47 +0300
commit6315347bff641f7b17d1bdaeffebe742a6991e77 (patch)
treea04651a8dae8af1f1df59077bcaa53bef6cd5369 /lib/directeditor.php
parent762c96df4e902b496371b852cdae554b0ab317e6 (diff)
expiration directToken
Diffstat (limited to 'lib/directeditor.php')
-rw-r--r--lib/directeditor.php8
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,