diff --git a/lib/Controller/WopiController.php b/lib/Controller/WopiController.php index 10fe1f0ae2..8af40fd1f5 100644 --- a/lib/Controller/WopiController.php +++ b/lib/Controller/WopiController.php @@ -178,9 +178,7 @@ public function checkFileInfo(string $fileId, string $access_token): JSONRespons if ($this->capabilitiesService->hasSettingIframeSupport()) { if (!$isPublic) { - // FIXME: Figure out what is going on here - // have not yet been able to trace the issue - // $response['UserSettings'] = $this->generateSettings($userId, 'userconfig'); + $response['UserSettings'] = $this->generateSettings($userId, 'userconfig'); } $response['SharedSettings'] = $this->generateSettings($userId, 'systemconfig'); } @@ -439,6 +437,10 @@ public function uploadSettingsFile(string $fileId, string $access_token): JSONRe $userId = $wopi->getEditorUid(); + if (empty($userId)) { + throw new \Exception('UserID is empty'); + } + $content = fopen('php://input', 'rb'); if (!$content) { throw new \Exception('Failed to read input stream.'); diff --git a/lib/Middleware/WOPIMiddleware.php b/lib/Middleware/WOPIMiddleware.php index de5aa2322f..613c9e7db4 100644 --- a/lib/Middleware/WOPIMiddleware.php +++ b/lib/Middleware/WOPIMiddleware.php @@ -55,6 +55,10 @@ public function beforeController($controller, $methodName) { return; } + if (strpos($this->request->getRequestUri(), 'wopi/settings/upload') !== false) { + return; + } + try { $fileId = $this->request->getParam('fileId'); $accessToken = $this->request->getParam('access_token');