diff --git a/lib/Storage/OneDrive.php b/lib/Storage/OneDrive.php index a24b560..1385ae2 100644 --- a/lib/Storage/OneDrive.php +++ b/lib/Storage/OneDrive.php @@ -87,12 +87,12 @@ public function __construct($params) $container = $app->getContainer(); $this->server = $container->getServer(); - $this->token = json_decode(base64_decode($params['token'])); + $this->token = json_decode(gzinflate(base64_decode($params['token']))); if ($this->token !== null) { $now = time() + 300; if ($this->token->expires <= $now) { - $this->token = json_decode(base64_decode($this->refreshToken($this->token))); + $this->token = json_decode(gzinflate(base64_decode($this->refreshToken($this->token)))); } } @@ -180,7 +180,7 @@ public function refreshToken() $newToken = json_decode($newToken, true); $newToken['code_uid'] = $this->token->code_uid; - $newToken = base64_encode(json_encode($newToken)); + $newToken = base64_encode(gzdeflate(json_encode($newToken), 9)); $user = $this->server->getUserSession()->getUser();