Skip to content

Commit 3ba5850

Browse files
authored
Update OneDrive.php
1 parent bc25b23 commit 3ba5850

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/Storage/OneDrive.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,12 @@ public function __construct($params)
8787
$container = $app->getContainer();
8888
$this->server = $container->getServer();
8989

90-
$this->token = json_decode(base64_decode($params['token']));
90+
$this->token = json_decode(gzinflate(base64_decode($params['token'])));
9191

9292
if ($this->token !== null) {
9393
$now = time() + 300;
9494
if ($this->token->expires <= $now) {
95-
$this->token = json_decode(base64_decode($this->refreshToken($this->token)));
95+
$this->token = json_decode(gzinflate(base64_decode($this->refreshToken($this->token))));
9696
}
9797
}
9898

@@ -180,7 +180,7 @@ public function refreshToken()
180180
$newToken = json_decode($newToken, true);
181181
$newToken['code_uid'] = $this->token->code_uid;
182182

183-
$newToken = base64_encode(json_encode($newToken));
183+
$newToken = base64_encode(gzdeflate(json_encode($newToken), 9));
184184

185185
$user = $this->server->getUserSession()->getUser();
186186

0 commit comments

Comments
 (0)