From b0b87fc177976cad6a0c382f5e566cad52a059f3 Mon Sep 17 00:00:00 2001 From: rivexe Date: Mon, 26 Feb 2024 13:13:59 +0300 Subject: [PATCH 01/14] fix: security vulnerability when file downloading is not permit --- controller/callbackcontroller.php | 40 +++++++++++++++++++----------- controller/editorapicontroller.php | 7 ++---- controller/editorcontroller.php | 19 +++++++++++++- lib/fileutility.php | 38 ++++++++++++++++++++++++++++ 4 files changed, 84 insertions(+), 20 deletions(-) diff --git a/controller/callbackcontroller.php b/controller/callbackcontroller.php index 58992b79..7e9b5f1b 100644 --- a/controller/callbackcontroller.php +++ b/controller/callbackcontroller.php @@ -42,6 +42,7 @@ use OCA\Onlyoffice\Crypt; use OCA\Onlyoffice\DocumentService; use OCA\Onlyoffice\FileVersions; +use OCA\Onlyoffice\FileUtility; use OCA\Onlyoffice\VersionManager; use OCA\Onlyoffice\KeyManager; use OCA\Onlyoffice\RemoteInstance; @@ -242,13 +243,24 @@ public function download($doc) { } $shareToken = isset($hashData->shareToken) ? $hashData->shareToken : null; - list($file, $error) = empty($shareToken) ? $this->getFile($userId, $fileId, null, $changes ? null : $version, $template) : $this->getFileByToken($fileId, $shareToken, $changes ? null : $version); + list($file, $error, $share) = empty($shareToken) ? $this->getFile($userId, $fileId, null, $changes ? null : $version, $template) : $this->getFileByToken($fileId, $shareToken, $changes ? null : $version); if (isset($error)) { return $error; } - if ($this->userSession->isLoggedIn() && !$file->isReadable()) { + $canDownload = true; + + $fileStorage = $file->getStorage(); + if ($fileStorage->instanceOfStorage("\OCA\Files_Sharing\SharedStorage") || !empty($shareToken)) { + $share = empty($share) ? $fileStorage->getShare() : $share; + $canDownload = FileUtility::canShareDownload($share); + if (!$canDownload && !empty($this->config->getDocumentServerSecret())) { + $canDownload = true; + } + } + + if ($this->userSession->isLoggedIn() && !$file->isReadable() || !$canDownload) { $this->logger->error("Download without access right", ["app" => $this->appName]); return new JSONResponse(["message" => $this->trans->t("Access denied")], Http::STATUS_FORBIDDEN); } @@ -504,7 +516,7 @@ public function track($doc, $users, $key, $status, $url, $token, $history, $chan \OC_Util::setupFS($userId); } - list($file, $error) = empty($shareToken) ? $this->getFile($userId, $fileId, $filePath) : $this->getFileByToken($fileId, $shareToken); + list($file, $error, $share) = empty($shareToken) ? $this->getFile($userId, $fileId, $filePath) : $this->getFileByToken($fileId, $shareToken); if (isset($error)) { $this->logger->error("track error: $fileId " . json_encode($error->getData()), ["app" => $this->appName]); @@ -613,7 +625,7 @@ function () use ($file, $newData) { */ private function getFile($userId, $fileId, $filePath = null, $version = 0, $template = false) { if (empty($fileId)) { - return [null, new JSONResponse(["message" => $this->trans->t("FileId is empty")], Http::STATUS_BAD_REQUEST)]; + return [null, new JSONResponse(["message" => $this->trans->t("FileId is empty")], Http::STATUS_BAD_REQUEST), null]; } try { @@ -621,12 +633,12 @@ private function getFile($userId, $fileId, $filePath = null, $version = 0, $temp $files = $folder->getById($fileId); } catch (\Exception $e) { $this->logger->logException($e, ["message" => "getFile: $fileId", "app" => $this->appName]); - return [null, new JSONResponse(["message" => $this->trans->t("Invalid request")], Http::STATUS_BAD_REQUEST)]; + return [null, new JSONResponse(["message" => $this->trans->t("Invalid request")], Http::STATUS_BAD_REQUEST), null]; } if (empty($files)) { $this->logger->error("Files not found: $fileId", ["app" => $this->appName]); - return [null, new JSONResponse(["message" => $this->trans->t("Files not found")], Http::STATUS_NOT_FOUND)]; + return [null, new JSONResponse(["message" => $this->trans->t("Files not found")], Http::STATUS_NOT_FOUND), null]; } $file = $files[0]; @@ -651,10 +663,10 @@ private function getFile($userId, $fileId, $filePath = null, $version = 0, $temp if ($owner !== null) { if ($owner->getUID() !== $userId) { - list($file, $error) = $this->getFile($owner->getUID(), $file->getId()); + list($file, $error, $share) = $this->getFile($owner->getUID(), $file->getId()); if (isset($error)) { - return [null, $error]; + return [null, $error, null]; } } @@ -667,7 +679,7 @@ private function getFile($userId, $fileId, $filePath = null, $version = 0, $temp } } - return [$file, null]; + return [$file, null, null]; } /** @@ -683,14 +695,14 @@ private function getFileByToken($fileId, $shareToken, $version = 0) { list($share, $error) = $this->getShare($shareToken); if (isset($error)) { - return [null, $error]; + return [null, $error, null]; } try { $node = $share->getNode(); } catch (NotFoundException $e) { $this->logger->logException($e, ["message" => "getFileByToken error", "app" => $this->appName]); - return [null, new JSONResponse(["message" => $this->trans->t("File not found")], Http::STATUS_NOT_FOUND)]; + return [null, new JSONResponse(["message" => $this->trans->t("File not found")], Http::STATUS_NOT_FOUND), null]; } if ($node instanceof Folder) { @@ -698,11 +710,11 @@ private function getFileByToken($fileId, $shareToken, $version = 0) { $files = $node->getById($fileId); } catch (\Exception $e) { $this->logger->logException($e, ["message" => "getFileByToken: $fileId", "app" => $this->appName]); - return [null, new JSONResponse(["message" => $this->trans->t("Invalid request")], Http::STATUS_NOT_FOUND)]; + return [null, new JSONResponse(["message" => $this->trans->t("Invalid request")], Http::STATUS_NOT_FOUND), null]; } if (empty($files)) { - return [null, new JSONResponse(["message" => $this->trans->t("File not found")], Http::STATUS_NOT_FOUND)]; + return [null, new JSONResponse(["message" => $this->trans->t("File not found")], Http::STATUS_NOT_FOUND), null]; } $file = $files[0]; } else { @@ -722,7 +734,7 @@ private function getFileByToken($fileId, $shareToken, $version = 0) { } } - return [$file, null]; + return [$file, null, $share]; } /** diff --git a/controller/editorapicontroller.php b/controller/editorapicontroller.php index 91558b84..f0d0d852 100644 --- a/controller/editorapicontroller.php +++ b/controller/editorapicontroller.php @@ -325,11 +325,8 @@ public function config($fileId, $filePath = null, $shareToken = null, $version = $storageShare = $fileStorage->getShare(); if (method_exists($storageShare, "getAttributes")) { $attributes = $storageShare->getAttributes(); - - $permissionsDownload = $attributes->getAttribute("permissions", "download"); - if ($permissionsDownload !== null) { - $params["document"]["permissions"]["download"] = $params["document"]["permissions"]["print"] = $params["document"]["permissions"]["copy"] = $permissionsDownload === true; - } + $canDownload = FileUtility::canShareDownload($storageShare); + $params["document"]["permissions"]["download"] = $params["document"]["permissions"]["print"] = $params["document"]["permissions"]["copy"] = $canDownload === true; if (isset($format["review"]) && $format["review"]) { $permissionsReviewOnly = $attributes->getAttribute($this->appName, "review"); diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index db269095..ee42e442 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -1092,7 +1092,16 @@ public function url($filePath) { $this->logger->error("File for generate presigned url was not found: $dir", ["app" => $this->appName]); return ["error" => $this->trans->t("File not found")]; } - if (!$file->isReadable()) { + + $canDownload = true; + + $fileStorage = $file->getStorage(); + if ($fileStorage->instanceOfStorage("\OCA\Files_Sharing\SharedStorage")) { + $share = $fileStorage->getShare(); + $canDownload = FileUtility::canShareDownload($share); + } + + if (!$file->isReadable() || !$canDownload) { $this->logger->error("File without permission: $dir", ["app" => $this->appName]); return ["error" => $this->trans->t("You do not have enough permissions to view the file")]; } @@ -1162,6 +1171,14 @@ public function download($fileId, $toExtension = null, $template = false) { return $this->renderError($this->trans->t("Not permitted")); } + $fileStorage = $file->getStorage(); + if ($fileStorage->instanceOfStorage("\OCA\Files_Sharing\SharedStorage")) { + $share = empty($share) ? $fileStorage->getShare() : $share; + if (!FileUtility::canShareDownload($share)) { + return $this->renderError($this->trans->t("Not permitted")); + } + } + $fileName = $file->getName(); $ext = strtolower(pathinfo($fileName, PATHINFO_EXTENSION)); $toExtension = strtolower($toExtension); diff --git a/lib/fileutility.php b/lib/fileutility.php index 8f2b6dab..2d0782db 100644 --- a/lib/fileutility.php +++ b/lib/fileutility.php @@ -27,6 +27,7 @@ use OCP\ILogger; use OCP\ISession; use OCP\Share\IManager; +use OCP\Share\IShare; use OCA\Onlyoffice\AppConfig; use OCA\Onlyoffice\Version; @@ -297,4 +298,41 @@ public function getVersionKey($version) { return $key; } + + /** + * The method checks download permission + * + * @param IShare $share - share object + * + * @return bool + */ + public static function canShareDownload($share) { + $can = true; + + $downloadAttribute = self::getShareAttrubute($share, "download"); + if (isset($downloadAttribute)) { + $can = $downloadAttribute; + } + + return $can; + } + + /** + * The method extracts share attribute + * + * @param IShare $share - share object + * @param string $attribute - attribute name + * + * @return bool|null + */ + private static function getShareAttrubute($share, $attribute) { + $attributes = null; + if (method_exists(IShare::class, "getAttributes")) { + $attributes = $share->getAttributes(); + } + + $attribute = isset($attributes) ? $attributes->getAttribute("permissions", $attribute) : null; + + return $attribute; + } } From 464c01ad80790e0e7f474ec4c50f87329857c099 Mon Sep 17 00:00:00 2001 From: rivexe Date: Mon, 26 Feb 2024 14:22:05 +0300 Subject: [PATCH 02/14] feat: if editors are available only for any group, don't add scripts --- lib/hookhandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/hookhandler.php b/lib/hookhandler.php index b1ca06e5..36c6b465 100644 --- a/lib/hookhandler.php +++ b/lib/hookhandler.php @@ -40,7 +40,7 @@ public static function publicPage() { $appConfig = new AppConfig($appName); - if (!empty($appConfig->getDocumentServerUrl()) && $appConfig->settingsAreSuccessful()) { + if (!empty($appConfig->getDocumentServerUrl()) && $appConfig->settingsAreSuccessful() && empty($appConfig->getLimitGroups())) { Util::addScript("onlyoffice", "main"); Util::addScript("onlyoffice", "share"); From 66407cb546c0a9ee081b2ee14623731e0280b62b Mon Sep 17 00:00:00 2001 From: rivexe Date: Mon, 26 Feb 2024 14:22:18 +0300 Subject: [PATCH 03/14] refactor: use empty() instead of count() for check limitGroups --- lib/appconfig.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/appconfig.php b/lib/appconfig.php index 4928a17f..f2cc4691 100644 --- a/lib/appconfig.php +++ b/lib/appconfig.php @@ -1070,7 +1070,7 @@ public function isUserAllowedToUse($userId = null) { $groups = $this->getLimitGroups(); // no group set -> all users are allowed - if (\count($groups) === 0) { + if (empty($groups)) { return true; } From af8cabfb0ddc5759896a50637450f73c2a82d405 Mon Sep 17 00:00:00 2001 From: rivexe Date: Mon, 26 Feb 2024 14:22:45 +0300 Subject: [PATCH 04/14] docs: fix guest redirect to changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d331cb45..67eeae49 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - offline viewer for share link - updatable list of supported formats - filling pdf instead oform +- fixed guest redirect when limiting the app to groups ## Added - reference data from coediting From fd5453eb4434208c2d52b07cdd16778fdc1c986d Mon Sep 17 00:00:00 2001 From: rivexe Date: Tue, 27 Feb 2024 11:01:54 +0300 Subject: [PATCH 05/14] feat: support of user avatar in editors --- appinfo/routes.php | 1 + controller/editorapicontroller.php | 18 +++++++++ controller/editorcontroller.php | 63 ++++++++++++++++++++++++++++++ js/editor.js | 35 ++++++++++++----- 4 files changed, 107 insertions(+), 10 deletions(-) diff --git a/appinfo/routes.php b/appinfo/routes.php index 0edcc195..cac20538 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -27,6 +27,7 @@ ["name" => "editor#download", "url" => "/downloadas", "verb" => "GET"], ["name" => "editor#index", "url" => "/{fileId}", "verb" => "GET"], ["name" => "editor#public_page", "url" => "/s/{shareToken}", "verb" => "GET"], + ["name" => "editor#user_info", "url" => "/ajax/userInfo", "verb" => "GET"], ["name" => "editor#users", "url" => "/ajax/users", "verb" => "GET"], ["name" => "editor#mention", "url" => "/ajax/mention", "verb" => "POST"], ["name" => "editor#reference", "url" => "/ajax/reference", "verb" => "POST"], diff --git a/controller/editorapicontroller.php b/controller/editorapicontroller.php index 91558b84..4e86bd94 100644 --- a/controller/editorapicontroller.php +++ b/controller/editorapicontroller.php @@ -113,6 +113,13 @@ class EditorApiController extends OCSController { */ private $versionManager; + /** + * Avatar manager + * + * @var IAvatarManager + */ + private $avatarManager; + /** * Tag manager * @@ -167,6 +174,7 @@ public function __construct( $this->versionManager = new VersionManager($AppName, $root); $this->fileUtility = new FileUtility($AppName, $trans, $logger, $config, $shareManager, $session); + $this->avatarManager = \OC::$server->getAvatarManager(); } /** @@ -436,6 +444,16 @@ public function config($fileId, $filePath = null, $shareToken = null, $version = "id" => $this->buildUserId($userId), "name" => $user->getDisplayName() ]; + $avatar = $this->avatarManager->getAvatar($userId); + if ($avatar->exists()) { + $userAvatarUrl = $this->urlGenerator->getAbsoluteURL( + $this->urlGenerator->linkToRoute("core.avatar.getAvatar", [ + "userId" => $userId, + "size" => 64, + ]) + ); + $params["editorConfig"]["user"]["image"] = $userAvatarUrl; + } } $folderLink = null; diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index db269095..324f1878 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -140,6 +140,13 @@ class EditorController extends Controller { */ private $groupManager; + /** + * Avatar manager + * + * @var IAvatarManager + */ + private $avatarManager; + /** * @param string $AppName - application name * @param IRequest $request - request object @@ -186,6 +193,7 @@ public function __construct( $this->versionManager = new VersionManager($AppName, $root); $this->fileUtility = new FileUtility($AppName, $trans, $logger, $config, $shareManager, $session); + $this->avatarManager = \OC::$server->getAvatarManager(); } /** @@ -415,6 +423,46 @@ public function users($fileId, $operationType = null) { return $result; } + /** + * Get user for Info + * + * @param string $userIds - users identifiers + * + * @return array + * + * @NoAdminRequired + * @NoCSRFRequired + */ + public function userInfo($userIds) { + $result = []; + $userIds = json_decode($userIds, true); + + if ($userIds !== null && is_array($userIds)) { + foreach ($userIds as $userId) { + $userData = []; + $user = $this->userManager->get($this->getUserId($userId)); + if (!empty($user)) { + $userData = [ + "name" => $user->getDisplayName(), + "id" => $userId + ]; + $avatar = $this->avatarManager->getAvatar($user->getUID()); + if ($avatar->exists()) { + $userAvatarUrl = $this->urlGenerator->getAbsoluteURL( + $this->urlGenerator->linkToRoute("core.avatar.getAvatar", [ + "userId" => $user->getUID(), + "size" => 64, + ]) + ); + $userData["image"] = $userAvatarUrl; + } + array_push($result, $userData); + } + } + } + return $result; + } + /** * Send notify about mention * @@ -1460,6 +1508,21 @@ private function limitEnumerationToGroups() { return false; } + /** + * Get Nextcloud userId from unique user identifier + * + * @param string $userId - current user identifier + * + * @return string + */ + private function getUserId($userId) { + if (str_contains($userId, "_")) { + $userIdExp = explode("_", $userId); + $userId = end($userIdExp); + } + return $userId; + } + /** * Print error page * diff --git a/js/editor.js b/js/editor.js index 512df2a0..f637724c 100644 --- a/js/editor.js +++ b/js/editor.js @@ -511,16 +511,31 @@ OCA.Onlyoffice.onRequestUsers = function (event) { let operationType = typeof(event.data.c) !== "undefined" ? event.data.c : null; - $.get(OC.generateUrl("apps/" + OCA.Onlyoffice.AppName + "/ajax/users?fileId={fileId}&operationType=" + operationType, - { - fileId: OCA.Onlyoffice.fileId || 0 - }), - function onSuccess(response) { - OCA.Onlyoffice.docEditor.setUsers({ - "c": operationType, - "users": response - }); - }); + switch (operationType) { + case "info": + $.get(OC.generateUrl("apps/" + OCA.Onlyoffice.AppName + "/ajax/userInfo?userIds={userIds}", + { + userIds: JSON.stringify(event.data.id) + }), + function onSuccess(response) { + OCA.Onlyoffice.docEditor.setUsers({ + "c": operationType, + "users": response + }); + }); + break; + default: + $.get(OC.generateUrl("apps/" + OCA.Onlyoffice.AppName + "/ajax/users?fileId={fileId}&operationType=" + operationType, + { + fileId: OCA.Onlyoffice.fileId || 0 + }), + function onSuccess(response) { + OCA.Onlyoffice.docEditor.setUsers({ + "c": operationType, + "users": response + }); + }); + } }; OCA.Onlyoffice.onRequestReferenceData = function (event) { From f6801961c6da729ec91ccb525d3b0fb3974a2a4e Mon Sep 17 00:00:00 2001 From: rivexe Date: Tue, 27 Feb 2024 11:02:12 +0300 Subject: [PATCH 06/14] docs: user avatar to CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d331cb45..3ff449e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ - opening a reference data source - changing a reference data source - setting for disable editors cron check +- support of user avatar in editor ## 8.2.3 ## Added From cf7e5bd125979e4742ddccfce5289efe02fa7a5a Mon Sep 17 00:00:00 2001 From: rivexe Date: Tue, 27 Feb 2024 11:14:10 +0300 Subject: [PATCH 07/14] refactor: format for linter --- controller/editorapicontroller.php | 11 +++++++---- controller/editorcontroller.php | 11 +++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/controller/editorapicontroller.php b/controller/editorapicontroller.php index 4e86bd94..822b25e7 100644 --- a/controller/editorapicontroller.php +++ b/controller/editorapicontroller.php @@ -447,10 +447,13 @@ public function config($fileId, $filePath = null, $shareToken = null, $version = $avatar = $this->avatarManager->getAvatar($userId); if ($avatar->exists()) { $userAvatarUrl = $this->urlGenerator->getAbsoluteURL( - $this->urlGenerator->linkToRoute("core.avatar.getAvatar", [ - "userId" => $userId, - "size" => 64, - ]) + $this->urlGenerator->linkToRoute( + "core.avatar.getAvatar", + [ + "userId" => $userId, + "size" => 64, + ] + ) ); $params["editorConfig"]["user"]["image"] = $userAvatarUrl; } diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index 324f1878..4fe95373 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -449,10 +449,13 @@ public function userInfo($userIds) { $avatar = $this->avatarManager->getAvatar($user->getUID()); if ($avatar->exists()) { $userAvatarUrl = $this->urlGenerator->getAbsoluteURL( - $this->urlGenerator->linkToRoute("core.avatar.getAvatar", [ - "userId" => $user->getUID(), - "size" => 64, - ]) + $this->urlGenerator->linkToRoute( + "core.avatar.getAvatar", + [ + "userId" => $userId, + "size" => 64, + ] + ) ); $userData["image"] = $userAvatarUrl; } From abe2379d9a317b7684a5c5d5884d2af38c590108 Mon Sep 17 00:00:00 2001 From: rivexe Date: Fri, 1 Mar 2024 11:38:18 +0300 Subject: [PATCH 08/14] fix: "restrict" to "allow" access translations --- l10n/bg_BG.js | 2 +- l10n/bg_BG.json | 2 +- l10n/ca.js | 1 - l10n/ca.json | 1 - l10n/da.js | 1 - l10n/da.json | 1 - l10n/de.js | 2 +- l10n/de.json | 2 +- l10n/de_DE.js | 2 +- l10n/de_DE.json | 2 +- l10n/es.js | 1 - l10n/es.json | 1 - l10n/fr.js | 1 - l10n/fr.json | 1 - l10n/it.js | 1 - l10n/it.json | 1 - l10n/ja.js | 1 - l10n/ja.json | 1 - l10n/nl.js | 1 - l10n/nl.json | 1 - l10n/pl.js | 1 - l10n/pl.json | 1 - l10n/pt_BR.js | 2 +- l10n/pt_BR.json | 2 +- l10n/ru.js | 2 +- l10n/ru.json | 2 +- l10n/sv.js | 1 - l10n/sv.json | 1 - l10n/uk.js | 2 +- l10n/uk.json | 2 +- l10n/zh_CN.js | 2 +- l10n/zh_CN.json | 2 +- templates/settings.php | 2 +- 33 files changed, 15 insertions(+), 33 deletions(-) diff --git a/l10n/bg_BG.js b/l10n/bg_BG.js index 240a5b3c..238b57d5 100644 --- a/l10n/bg_BG.js +++ b/l10n/bg_BG.js @@ -45,7 +45,7 @@ OC.L10N.register( "View details" : "Виж детайли", "Save" : "Запази", "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Смесеното активно съдържание е недопустимо. За ONLYOFFICE Docs е необходимо използването на HTTPS-адрес.", - "Restrict access to editors to following groups" : "Разреши достъп до редакторите само за тези групи", + "Allow the following groups to access the editors" : "Разреши достъп до редакторите само за тези групи", "review" : "преглед", "form filling" : "попълване на формуляр", "comment" : "коментар", diff --git a/l10n/bg_BG.json b/l10n/bg_BG.json index e169214b..70141394 100644 --- a/l10n/bg_BG.json +++ b/l10n/bg_BG.json @@ -43,7 +43,7 @@ "View details" : "Виж детайли", "Save" : "Запази", "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Смесеното активно съдържание е недопустимо. За ONLYOFFICE Docs е необходимо използването на HTTPS-адрес.", - "Restrict access to editors to following groups" : "Разреши достъп до редакторите само за тези групи", + "Allow the following groups to access the editors" : "Разреши достъп до редакторите само за тези групи", "review" : "преглед", "form filling" : "попълване на формуляр", "comment" : "коментар", diff --git a/l10n/ca.js b/l10n/ca.js index d8c2649e..5bf486b7 100644 --- a/l10n/ca.js +++ b/l10n/ca.js @@ -45,7 +45,6 @@ OC.L10N.register( "View details" : "Veure detalls", "Save" : "Guardar", "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Contingut Mixt Actiu no està permès. Es requereix la direcció HTTPS per a ONLYOFFICE Docs.", - "Restrict access to editors to following groups" : "Restringir l'accés a editors a següents grups", "review" : "", "form filling" : "", "comment" : "", diff --git a/l10n/ca.json b/l10n/ca.json index 0d037d65..eed5666a 100644 --- a/l10n/ca.json +++ b/l10n/ca.json @@ -43,7 +43,6 @@ "View details" : "Veure detalls", "Save" : "Guardar", "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Contingut Mixt Actiu no està permès. Es requereix la direcció HTTPS per a ONLYOFFICE Docs.", - "Restrict access to editors to following groups" : "Restringir l'accés a editors a següents grups", "review" : "", "form filling" : "", "comment" : "", diff --git a/l10n/da.js b/l10n/da.js index f82aed55..bba50686 100644 --- a/l10n/da.js +++ b/l10n/da.js @@ -45,7 +45,6 @@ OC.L10N.register( "View details": "Se detaljer", "Save": "Gem", "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required.": "Blandet aktivt indhold er ikke tilladt. HTTPS-adresse for ONLYOFFICE Docs er påkrævet.", - "Restrict access to editors to following groups": "Begræns adgangen til redaktører til følgende grupper", "review": "Anmeldelse", "form filling": "Formular udfyldning", "comment": "Kommentar", diff --git a/l10n/da.json b/l10n/da.json index f651f019..4a558a42 100644 --- a/l10n/da.json +++ b/l10n/da.json @@ -43,7 +43,6 @@ "View details": "Se detaljer", "Save": "Gem", "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required.": "Blandet aktivt indhold er ikke tilladt. HTTPS-adresse for ONLYOFFICE Docs er påkrævet.", - "Restrict access to editors to following groups": "Begræns adgangen til redaktører til følgende grupper", "review": "Anmeldelse", "form filling": "Formular udfyldning", "comment": "Kommentar", diff --git a/l10n/de.js b/l10n/de.js index 284937b8..65cfbc04 100644 --- a/l10n/de.js +++ b/l10n/de.js @@ -45,7 +45,7 @@ OC.L10N.register( "View details" : "Details anzeigen", "Save" : "Speichern", "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Mixed Active Content ist nicht möglich. HTTPS-Adresse für ONLYOFFICE Docs ist erforderlich.", - "Restrict access to editors to following groups" : "Den Zugriff auf Editoren auf folgende Gruppen gewähren", + "Allow the following groups to access the editors" : "Den Zugriff auf Editoren auf folgende Gruppen gewähren", "review" : "review", "form filling" : "ausfüllen von formularen", "comment" : "kommentarе", diff --git a/l10n/de.json b/l10n/de.json index 17a3e527..f33c723d 100644 --- a/l10n/de.json +++ b/l10n/de.json @@ -43,7 +43,7 @@ "View details" : "Details anzeigen", "Save" : "Speichern", "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Mixed Active Content ist nicht möglich. HTTPS-Adresse für ONLYOFFICE Docs ist erforderlich.", - "Restrict access to editors to following groups" : "Den Zugriff auf Editoren auf folgende Gruppen gewähren", + "Allow the following groups to access the editors" : "Den Zugriff auf Editoren auf folgende Gruppen gewähren", "review" : "review", "form filling" : "ausfüllen von formularen", "comment" : "kommentarе", diff --git a/l10n/de_DE.js b/l10n/de_DE.js index 647b3236..4229fe57 100644 --- a/l10n/de_DE.js +++ b/l10n/de_DE.js @@ -45,7 +45,7 @@ OC.L10N.register( "View details" : "Details anzeigen", "Save" : "Speichern", "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Mixed Active Content ist nicht möglich. HTTPS-Adresse für ONLYOFFICE Docs ist erforderlich.", - "Restrict access to editors to following groups" : "Den Zugriff auf Editoren auf folgende Gruppen gewähren", + "Allow the following groups to access the editors" : "Den Zugriff auf Editoren auf folgende Gruppen gewähren", "review" : "review", "form filling" : "ausfüllen von formularen", "comment" : "kommentarе", diff --git a/l10n/de_DE.json b/l10n/de_DE.json index 0d5502c8..05d424c7 100644 --- a/l10n/de_DE.json +++ b/l10n/de_DE.json @@ -43,7 +43,7 @@ "View details" : "Details anzeigen", "Save" : "Speichern", "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Mixed Active Content ist nicht möglich. HTTPS-Adresse für ONLYOFFICE Docs ist erforderlich.", - "Restrict access to editors to following groups" : "Den Zugriff auf Editoren auf folgende Gruppen gewähren", + "Allow the following groups to access the editors" : "Den Zugriff auf Editoren auf folgende Gruppen gewähren", "review" : "review", "form filling" : "ausfüllen von formularen", "comment" : "kommentarе", diff --git a/l10n/es.js b/l10n/es.js index 05e233d6..ada1556f 100644 --- a/l10n/es.js +++ b/l10n/es.js @@ -45,7 +45,6 @@ OC.L10N.register( "View details" : "Ver detalles", "Save" : "Guardar", "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Contenido Mixto Activo no está permitido. Se requiere la dirección HTTPS para ONLYOFFICE Docs.", - "Restrict access to editors to following groups" : "Restringir el acceso a editores a siguientes grupos", "review" : "revista", "form filling" : "relleno de formulario", "comment" : "comentarios", diff --git a/l10n/es.json b/l10n/es.json index 3508ec87..946741c4 100644 --- a/l10n/es.json +++ b/l10n/es.json @@ -43,7 +43,6 @@ "View details" : "Ver detalles", "Save" : "Guardar", "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Contenido Mixto Activo no está permitido. Se requiere la dirección HTTPS para ONLYOFFICE Docs.", - "Restrict access to editors to following groups" : "Restringir el acceso a editores a siguientes grupos", "review" : "revista", "form filling" : "relleno de formulario", "comment" : "comentarios", diff --git a/l10n/fr.js b/l10n/fr.js index fd532962..b0636bac 100644 --- a/l10n/fr.js +++ b/l10n/fr.js @@ -45,7 +45,6 @@ OC.L10N.register( "View details" : "Voir les détails", "Save" : "Enregistrer", "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Le contenu mixte actif n'est pas autorisé. Une adresse HTTPS pour le ONLYOFFICE Docs est requise", - "Restrict access to editors to following groups" : "Restreindre l'accès aux éditeurs pour les groupes suivants", "review" : "révision", "form filling" : "remplissage de formulaire", "comment" : "commentaire", diff --git a/l10n/fr.json b/l10n/fr.json index 637cc6e4..50d01b55 100644 --- a/l10n/fr.json +++ b/l10n/fr.json @@ -43,7 +43,6 @@ "View details" : "Voir les détails", "Save" : "Enregistrer", "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Le contenu mixte actif n'est pas autorisé. Une adresse HTTPS pour le ONLYOFFICE Docs est requise", - "Restrict access to editors to following groups" : "Restreindre l'accès aux éditeurs pour les groupes suivants", "review" : "révision", "form filling" : "remplissage de formulaire", "comment" : "commentaire", diff --git a/l10n/it.js b/l10n/it.js index 0c748d66..bb0c4372 100644 --- a/l10n/it.js +++ b/l10n/it.js @@ -45,7 +45,6 @@ OC.L10N.register( "View details" : "Vedi dettagli", "Save" : "Salva", "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Il contenuto attivo misto non è consentito. È richiesto l'indirizzo HTTPS per ONLYOFFICE Docs.", - "Restrict access to editors to following groups" : "Limita l'accesso degli editor ai seguenti gruppi", "review" : "Revisione", "form filling" : "Compilare un modulo", "comment" : "Commento", diff --git a/l10n/it.json b/l10n/it.json index 7d15e8b7..e94ec4f6 100644 --- a/l10n/it.json +++ b/l10n/it.json @@ -43,7 +43,6 @@ "View details" : "Vedi dettagli", "Save" : "Salva", "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Il contenuto attivo misto non è consentito. È richiesto l'indirizzo HTTPS per ONLYOFFICE Docs.", - "Restrict access to editors to following groups" : "Limita l'accesso degli editor ai seguenti gruppi", "review" : "Revisione", "form filling" : "Compilare un modulo", "comment" : "Commento", diff --git a/l10n/ja.js b/l10n/ja.js index 5cd04bf3..33f7d454 100644 --- a/l10n/ja.js +++ b/l10n/ja.js @@ -45,7 +45,6 @@ OC.L10N.register( "View details" : "詳細表示", "Save" : "保存", "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "アクティブコンテンツの混在は許可されていません。ONLYOFFICE DocsにはHTTPSアドレスが必要です", - "Restrict access to editors to following groups": "エディターの利用を以下のグループに制限する", "review" : "レビュー", "form filling" : "フォーム入力", "comment" : "コメント", diff --git a/l10n/ja.json b/l10n/ja.json index cd9ceb55..bb6d80c9 100644 --- a/l10n/ja.json +++ b/l10n/ja.json @@ -43,7 +43,6 @@ "View details" : "詳細表示", "Save" : "保存", "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "アクティブコンテンツの混在は許可されていません。ONLYOFFICE DocsにはHTTPSアドレスが必要です", - "Restrict access to editors to following groups" : "エディターの利用を以下のグループに制限する", "review" : "レビュー", "form filling" : "フォーム入力", "comment" : "コメント", diff --git a/l10n/nl.js b/l10n/nl.js index c77193e9..dba08aff 100644 --- a/l10n/nl.js +++ b/l10n/nl.js @@ -45,7 +45,6 @@ OC.L10N.register( "View details": "Bekijk details", "Save": "Opslaan", "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required.": "Gemende Actieve Inhoud is niet toegestaan. HTTPS-adres voor ONLYOFFICE Docs is vereist.", - "Restrict access to editors to following groups": "Beperk de toegang tot editors tot de volgende groepen", "review": "overzicht", "form filling": "formulier invullen", "comment": "opmerking", diff --git a/l10n/nl.json b/l10n/nl.json index 572f5fa7..72bdab3c 100644 --- a/l10n/nl.json +++ b/l10n/nl.json @@ -43,7 +43,6 @@ "View details" : "Bekijk details", "Save" : "Opslaan", "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Gemende Actieve Inhoud is niet toegestaan. HTTPS-adres voor ONLYOFFICE Docs is vereist.", - "Restrict access to editors to following groups" : "Beperk de toegang tot editors tot de volgende groepen", "review" : "overzicht", "form filling" : "formulier invullen", "comment" : "opmerking", diff --git a/l10n/pl.js b/l10n/pl.js index 3d97e2f5..ef921d40 100644 --- a/l10n/pl.js +++ b/l10n/pl.js @@ -45,7 +45,6 @@ OC.L10N.register( "View details" : "Szczegóły", "Save" : "Zapisz", "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Aktywna Zawartość Mieszana nie jest dozwolona. Adres HTTPS jest wymagany dla ONLYOFFICE Docs.", - "Restrict access to editors to following groups" : "Ogranicz dostęp do edytorów dla tych grup", "review" : "recenzja", "form filling" : "wypełnianie formularza", "comment" : "komentarz", diff --git a/l10n/pl.json b/l10n/pl.json index 387688bd..9f4b0565 100644 --- a/l10n/pl.json +++ b/l10n/pl.json @@ -43,7 +43,6 @@ "View details" : "Szczegóły", "Save" : "Zapisz", "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Aktywna Zawartość Mieszana nie jest dozwolona. Adres HTTPS jest wymagany dla ONLYOFFICE Docs.", - "Restrict access to editors to following groups" : "Ogranicz dostęp do edytorów dla tych grup", "review" : "recenzja", "form filling" : "wypełnianie formularza", "comment" : "komentarz", diff --git a/l10n/pt_BR.js b/l10n/pt_BR.js index 9d041625..45ecad40 100644 --- a/l10n/pt_BR.js +++ b/l10n/pt_BR.js @@ -45,7 +45,7 @@ OC.L10N.register( "View details" : "Ver detalhes", "Save" : "Salvar", "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Conteúdo Misto não é permitido. É necessário um endereço HTTPS para o ONLYOFFICE Docs.", - "Restrict access to editors to following groups" : "Acesso apenas para os seguintes grupos", + "Allow the following groups to access the editors" : "Acesso apenas para os seguintes grupos", "review" : "revisar", "form filling" : "preenchimento de formularios", "comment" : "comente", diff --git a/l10n/pt_BR.json b/l10n/pt_BR.json index 5d084772..3b5bc105 100644 --- a/l10n/pt_BR.json +++ b/l10n/pt_BR.json @@ -43,7 +43,7 @@ "View details" : "Ver detalhes", "Save" : "Salvar", "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Conteúdo Misto não é permitido. É necessário um endereço HTTPS para o ONLYOFFICE Docs.", - "Restrict access to editors to following groups" : "Acesso apenas para os seguintes grupos", + "Allow the following groups to access the editors" : "Acesso apenas para os seguintes grupos", "review" : "revisar", "form filling" : "preenchimento de formularios", "comment" : "comente", diff --git a/l10n/ru.js b/l10n/ru.js index 104bf03a..7bcf1761 100644 --- a/l10n/ru.js +++ b/l10n/ru.js @@ -45,7 +45,7 @@ OC.L10N.register( "View details" : "Подробнее", "Save" : "Сохранить", "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Смешанное активное содержимое запрещено. Для ONLYOFFICE Docs необходимо использовать HTTPS-адрес.", - "Restrict access to editors to following groups" : "Дать доступ к редакторам только следующим группам", + "Allow the following groups to access the editors" : "Дать доступ к редакторам только следующим группам", "review" : "рецензирование", "form filling" : "заполнение форм", "comment" : "комментирование", diff --git a/l10n/ru.json b/l10n/ru.json index 3dcca661..8d16535d 100644 --- a/l10n/ru.json +++ b/l10n/ru.json @@ -43,7 +43,7 @@ "View details" : "Подробнее", "Save" : "Сохранить", "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Смешанное активное содержимое запрещено. Для ONLYOFFICE Docs необходимо использовать HTTPS-адрес.", - "Restrict access to editors to following groups" : "Дать доступ к редакторам только следующим группам", + "Allow the following groups to access the editors" : "Дать доступ к редакторам только следующим группам", "review" : "рецензирование", "form filling" : "заполнение форм", "comment" : "комментирование", diff --git a/l10n/sv.js b/l10n/sv.js index 736e8142..5155e451 100644 --- a/l10n/sv.js +++ b/l10n/sv.js @@ -45,7 +45,6 @@ OC.L10N.register( "View details" : "Visa detaljer", "Save" : "Spara", "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Blandat aktivt innehåll är inte tillåtet. HTTPS-adress till ONLYOFFICE Docs krävs.", - "Restrict access to editors to following groups" : "Begränsa åtkomst till följande grupper", "review" : "granska", "form filling" : "formulärfyllning", "comment" : "kommentar", diff --git a/l10n/sv.json b/l10n/sv.json index 69956b00..feb18cb4 100644 --- a/l10n/sv.json +++ b/l10n/sv.json @@ -43,7 +43,6 @@ "View details" : "Visa detaljer", "Save" : "Spara", "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Blandat aktivt innehåll är inte tillåtet. HTTPS-adress till ONLYOFFICE Docs krävs.", - "Restrict access to editors to following groups" : "Begränsa åtkomst till följande grupper", "review" : "granska", "form filling" : "formulärfyllning", "comment" : "kommentar", diff --git a/l10n/uk.js b/l10n/uk.js index e1fdfb0a..e6dbaf54 100644 --- a/l10n/uk.js +++ b/l10n/uk.js @@ -44,7 +44,7 @@ OC.L10N.register( "View details": "Докладно", "Save": "Зберегти", "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required.": "Зміщаний активний вміст заборонено. Для використання ONLYOFFICE Docs потрібно використовувати безпечне HTTPS-з'єднання.", - "Restrict access to editors to following groups": "Надати доступ до редагування лише таким групам", + "Allow the following groups to access the editors": "Надати доступ до редагування лише таким групам", "review": "рецензії", "form filling": "заповнення форм", "comment": "коментарі", diff --git a/l10n/uk.json b/l10n/uk.json index de91615b..4b98d5ce 100644 --- a/l10n/uk.json +++ b/l10n/uk.json @@ -43,7 +43,7 @@ "View details": "Докладно", "Save": "Зберегти", "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required.": "Зміщаний активний вміст заборонено. Для використання ONLYOFFICE Docs потрібно використовувати безпечне HTTPS-з'єднання.", - "Restrict access to editors to following groups": "Надати доступ до редагування лише таким групам", + "Allow the following groups to access the editors": "Надати доступ до редагування лише таким групам", "review": "рецензії", "form filling": "заповнення форм", "comment": "коментарі", diff --git a/l10n/zh_CN.js b/l10n/zh_CN.js index b356622a..70fd15f7 100644 --- a/l10n/zh_CN.js +++ b/l10n/zh_CN.js @@ -45,7 +45,7 @@ OC.L10N.register( "View details" : "查看详情", "Save" : "保存", "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "不允许混合活动内容,请使用HTTPS连接ONLYOFFICE Docs。", - "Restrict access to editors to following groups" : "仅授权的用户组可以使用该服务", + "Allow the following groups to access the editors" : "仅授权的用户组可以使用该服务", "review" : "审阅", "form filling" : "表单填报", "comment" : "评论", diff --git a/l10n/zh_CN.json b/l10n/zh_CN.json index 3981b395..f2d0aca2 100644 --- a/l10n/zh_CN.json +++ b/l10n/zh_CN.json @@ -43,7 +43,7 @@ "View details" : "查看详情", "Save" : "保存", "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "不允许混合活动内容,请使用HTTPS连接ONLYOFFICE Docs。", - "Restrict access to editors to following groups" : "仅授权的用户组可以使用该服务", + "Allow the following groups to access the editors" : "仅授权的用户组可以使用该服务", "review" : "审阅", "form filling" : "表单填报", "comment" : "评论", diff --git a/templates/settings.php b/templates/settings.php index ebd4c575..46d46d21 100644 --- a/templates/settings.php +++ b/templates/settings.php @@ -112,7 +112,7 @@

0) { ?>checked="checked" /> - +
" style="display: block; margin-top: 6px; width: 265px;" /> From c1c2a6ff6aa0198a7abb77f68dfcc3c00d6336d4 Mon Sep 17 00:00:00 2001 From: rivexe Date: Fri, 1 Mar 2024 13:49:59 +0300 Subject: [PATCH 09/14] fix: change custom filter to global --- js/share.js | 4 ++-- l10n/bg_BG.js | 1 - l10n/bg_BG.json | 1 - l10n/ca.js | 1 - l10n/ca.json | 1 - l10n/da.js | 1 - l10n/da.json | 1 - l10n/de.js | 1 - l10n/de.json | 1 - l10n/de_DE.js | 1 - l10n/de_DE.json | 1 - l10n/es.js | 1 - l10n/es.json | 1 - l10n/fr.js | 1 - l10n/fr.json | 1 - l10n/it.js | 1 - l10n/it.json | 1 - l10n/ja.js | 1 - l10n/ja.json | 1 - l10n/nl.js | 1 - l10n/nl.json | 1 - l10n/pl.js | 1 - l10n/pl.json | 1 - l10n/pt_BR.js | 1 - l10n/pt_BR.json | 1 - l10n/ru.js | 1 - l10n/ru.json | 1 - l10n/sv.js | 1 - l10n/sv.json | 1 - l10n/uk.js | 1 - l10n/uk.json | 2 +- l10n/zh_CN.js | 1 - l10n/zh_CN.json | 1 - 33 files changed, 3 insertions(+), 34 deletions(-) diff --git a/js/share.js b/js/share.js index a1364f54..7ae75725 100644 --- a/js/share.js +++ b/js/share.js @@ -341,7 +341,7 @@ } else if (attribute.key === "comment") { label = t(OCA.Onlyoffice.AppName, "comment"); } else if (attribute.key === "modifyFilter") { - label = t(OCA.Onlyoffice.AppName, "custom filter"); + label = t(OCA.Onlyoffice.AppName, "global filter"); } else { continue; } @@ -603,7 +603,7 @@ "scope": OCA.Onlyoffice.AppName, "key": "modifyFilter", "default": true, - "label": t(OCA.Onlyoffice.AppName, "custom filter"), + "label": t(OCA.Onlyoffice.AppName, "global filter"), "requiredPermissions": [OC.PERMISSION_UPDATE], "incompatibleAttributes": [ { diff --git a/l10n/bg_BG.js b/l10n/bg_BG.js index 240a5b3c..5acba786 100644 --- a/l10n/bg_BG.js +++ b/l10n/bg_BG.js @@ -49,7 +49,6 @@ OC.L10N.register( "review" : "преглед", "form filling" : "попълване на формуляр", "comment" : "коментар", - "custom filter" : "персонализиран филтър", "download" : "изтегли", "Server settings" : "Настройки на сървъра", "Common settings" : "Общи настройки", diff --git a/l10n/bg_BG.json b/l10n/bg_BG.json index e169214b..c72951c2 100644 --- a/l10n/bg_BG.json +++ b/l10n/bg_BG.json @@ -47,7 +47,6 @@ "review" : "преглед", "form filling" : "попълване на формуляр", "comment" : "коментар", - "custom filter" : "персонализиран филтър", "download" : "изтегли", "Server settings" : "Настройки на сървъра", "Common settings" : "Общи настройки", diff --git a/l10n/ca.js b/l10n/ca.js index d8c2649e..060e9343 100644 --- a/l10n/ca.js +++ b/l10n/ca.js @@ -49,7 +49,6 @@ OC.L10N.register( "review" : "", "form filling" : "", "comment" : "", - "custom filter" : "", "download" : "", "Server settings" : "Ajustos de servidor", "Common settings" : "Ajustos comuns", diff --git a/l10n/ca.json b/l10n/ca.json index 0d037d65..3ee9d2ec 100644 --- a/l10n/ca.json +++ b/l10n/ca.json @@ -47,7 +47,6 @@ "review" : "", "form filling" : "", "comment" : "", - "custom filter" : "", "download" : "", "Server settings" : "Ajustos de servidor", "Common settings" : "Ajustos comuns", diff --git a/l10n/da.js b/l10n/da.js index f82aed55..d6b3ff7f 100644 --- a/l10n/da.js +++ b/l10n/da.js @@ -49,7 +49,6 @@ OC.L10N.register( "review": "Anmeldelse", "form filling": "Formular udfyldning", "comment": "Kommentar", - "custom filter": "Brugerdefineret filter", "download": "Hent", "Server settings": "Serverindstillinger", "Common settings": "Fælles indstillinger", diff --git a/l10n/da.json b/l10n/da.json index f651f019..e9e04510 100644 --- a/l10n/da.json +++ b/l10n/da.json @@ -47,7 +47,6 @@ "review": "Anmeldelse", "form filling": "Formular udfyldning", "comment": "Kommentar", - "custom filter": "Brugerdefineret filter", "download": "Hent", "Server settings": "Serverindstillinger", "Common settings": "Fælles indstillinger", diff --git a/l10n/de.js b/l10n/de.js index 284937b8..f0d3e182 100644 --- a/l10n/de.js +++ b/l10n/de.js @@ -49,7 +49,6 @@ OC.L10N.register( "review" : "review", "form filling" : "ausfüllen von formularen", "comment" : "kommentarе", - "custom filter" : "benutzerdefinierter filter", "download" : "herunterladen", "Server settings" : "Servereinstellungen", "Common settings" : "Allgemeine Einstellungen", diff --git a/l10n/de.json b/l10n/de.json index 17a3e527..be7f250d 100644 --- a/l10n/de.json +++ b/l10n/de.json @@ -47,7 +47,6 @@ "review" : "review", "form filling" : "ausfüllen von formularen", "comment" : "kommentarе", - "custom filter" : "benutzerdefinierter filter", "download" : "herunterladen", "Server settings" : "Servereinstellungen", "Common settings" : "Allgemeine Einstellungen", diff --git a/l10n/de_DE.js b/l10n/de_DE.js index 647b3236..689bded9 100644 --- a/l10n/de_DE.js +++ b/l10n/de_DE.js @@ -49,7 +49,6 @@ OC.L10N.register( "review" : "review", "form filling" : "ausfüllen von formularen", "comment" : "kommentarе", - "custom filter" : "benutzerdefinierter filter", "download" : "herunterladen", "Server settings" : "Servereinstellungen", "Common settings" : "Allgemeine Einstellungen", diff --git a/l10n/de_DE.json b/l10n/de_DE.json index 0d5502c8..4b570073 100644 --- a/l10n/de_DE.json +++ b/l10n/de_DE.json @@ -47,7 +47,6 @@ "review" : "review", "form filling" : "ausfüllen von formularen", "comment" : "kommentarе", - "custom filter" : "benutzerdefinierter filter", "download" : "herunterladen", "Server settings" : "Servereinstellungen", "Common settings" : "Allgemeine Einstellungen", diff --git a/l10n/es.js b/l10n/es.js index 05e233d6..16d70efd 100644 --- a/l10n/es.js +++ b/l10n/es.js @@ -49,7 +49,6 @@ OC.L10N.register( "review" : "revista", "form filling" : "relleno de formulario", "comment" : "comentarios", - "custom filter" : "filtro personalizado", "download" : "descargar", "Server settings" : "Ajustes de servidor", "Common settings" : "Ajustes comunes", diff --git a/l10n/es.json b/l10n/es.json index 3508ec87..ced261b2 100644 --- a/l10n/es.json +++ b/l10n/es.json @@ -47,7 +47,6 @@ "review" : "revista", "form filling" : "relleno de formulario", "comment" : "comentarios", - "custom filter" : "filtro personalizado", "download" : "descargar", "Server settings" : "Ajustes de servidor", "Common settings" : "Ajustes comunes", diff --git a/l10n/fr.js b/l10n/fr.js index fd532962..175b1a51 100644 --- a/l10n/fr.js +++ b/l10n/fr.js @@ -49,7 +49,6 @@ OC.L10N.register( "review" : "révision", "form filling" : "remplissage de formulaire", "comment" : "commentaire", - "custom filter" : "filtre personnalisé", "download" : "télécharger", "Server settings" : "Paramètres du serveur", "Common settings" : "Paramètres communs", diff --git a/l10n/fr.json b/l10n/fr.json index 637cc6e4..fab02059 100644 --- a/l10n/fr.json +++ b/l10n/fr.json @@ -47,7 +47,6 @@ "review" : "révision", "form filling" : "remplissage de formulaire", "comment" : "commentaire", - "custom filter" : "filtre personnalisé", "download" : "télécharger", "Server settings" : "Paramètres du serveur", "Common settings" : "Paramètres communs", diff --git a/l10n/it.js b/l10n/it.js index 0c748d66..7f0bd542 100644 --- a/l10n/it.js +++ b/l10n/it.js @@ -49,7 +49,6 @@ OC.L10N.register( "review" : "Revisione", "form filling" : "Compilare un modulo", "comment" : "Commento", - "custom filter" : "Filtro personalizzato", "download" : "Scarica", "Server settings" : "Impostazioni del server", "Common settings" : "Impostazioni comuni", diff --git a/l10n/it.json b/l10n/it.json index 7d15e8b7..5385d69a 100644 --- a/l10n/it.json +++ b/l10n/it.json @@ -47,7 +47,6 @@ "review" : "Revisione", "form filling" : "Compilare un modulo", "comment" : "Commento", - "custom filter" : "Filtro personalizzato", "download" : "Scarica", "Server settings" : "Impostazioni del server", "Common settings" : "Impostazioni comuni", diff --git a/l10n/ja.js b/l10n/ja.js index 5cd04bf3..6ca47202 100644 --- a/l10n/ja.js +++ b/l10n/ja.js @@ -49,7 +49,6 @@ OC.L10N.register( "review" : "レビュー", "form filling" : "フォーム入力", "comment" : "コメント", - "custom filter" : "ユーザー設定フィルター", "download" : "ダウンロード", "Server settings" : "サーバー設定", "Common settings" : "共通設定", diff --git a/l10n/ja.json b/l10n/ja.json index cd9ceb55..ebd5880b 100644 --- a/l10n/ja.json +++ b/l10n/ja.json @@ -47,7 +47,6 @@ "review" : "レビュー", "form filling" : "フォーム入力", "comment" : "コメント", - "custom filter" : "ユーザー設定フィルター", "download" : "ダウンロード", "Server settings" : "サーバー設定", "Common settings" : "共通設定", diff --git a/l10n/nl.js b/l10n/nl.js index c77193e9..76d363bf 100644 --- a/l10n/nl.js +++ b/l10n/nl.js @@ -49,7 +49,6 @@ OC.L10N.register( "review": "overzicht", "form filling": "formulier invullen", "comment": "opmerking", - "custom filter": "aangepast filter", "download": "downloaden", "Server settings": "Serverinstellingen", "Common settings": "Algemene instellingen", diff --git a/l10n/nl.json b/l10n/nl.json index 572f5fa7..c4cd2e61 100644 --- a/l10n/nl.json +++ b/l10n/nl.json @@ -47,7 +47,6 @@ "review" : "overzicht", "form filling" : "formulier invullen", "comment" : "opmerking", - "custom filter" : "aangepast filter", "download" : "downloaden", "Server settings" : "Serverinstellingen", "Common settings" : "Algemene instellingen", diff --git a/l10n/pl.js b/l10n/pl.js index 3d97e2f5..7962ecc8 100644 --- a/l10n/pl.js +++ b/l10n/pl.js @@ -49,7 +49,6 @@ OC.L10N.register( "review" : "recenzja", "form filling" : "wypełnianie formularza", "comment" : "komentarz", - "custom filter" : "niestandardowy filtr", "download" : "pobierz", "Server settings" : "Ustawienia serwera", "Common settings" : "Ustawienia ogólne", diff --git a/l10n/pl.json b/l10n/pl.json index 387688bd..66371c3b 100644 --- a/l10n/pl.json +++ b/l10n/pl.json @@ -47,7 +47,6 @@ "review" : "recenzja", "form filling" : "wypełnianie formularza", "comment" : "komentarz", - "custom filter" : "niestandardowy filtr", "download" : "pobierz", "Server settings" : "Ustawienia serwera", "Common settings" : "Ustawienia ogólne", diff --git a/l10n/pt_BR.js b/l10n/pt_BR.js index 9d041625..c33894e3 100644 --- a/l10n/pt_BR.js +++ b/l10n/pt_BR.js @@ -49,7 +49,6 @@ OC.L10N.register( "review" : "revisar", "form filling" : "preenchimento de formularios", "comment" : "comente", - "custom filter" : "filtro personalizado", "download" : "baixar", "Server settings" : "Configurações do servidor", "Common settings" : "Configurações comuns", diff --git a/l10n/pt_BR.json b/l10n/pt_BR.json index 5d084772..204f100c 100644 --- a/l10n/pt_BR.json +++ b/l10n/pt_BR.json @@ -47,7 +47,6 @@ "review" : "revisar", "form filling" : "preenchimento de formularios", "comment" : "comente", - "custom filter" : "filtro personalizado", "download" : "baixar", "Server settings" : "Configurações do servidor", "Common settings" : "Configurações comuns", diff --git a/l10n/ru.js b/l10n/ru.js index 104bf03a..80f1e588 100644 --- a/l10n/ru.js +++ b/l10n/ru.js @@ -49,7 +49,6 @@ OC.L10N.register( "review" : "рецензирование", "form filling" : "заполнение форм", "comment" : "комментирование", - "custom filter" : "пользовательский фильтр", "download" : "скачивание", "Server settings" : "Настройки сервера", "Common settings" : "Общие настройки", diff --git a/l10n/ru.json b/l10n/ru.json index 3dcca661..27039f65 100644 --- a/l10n/ru.json +++ b/l10n/ru.json @@ -47,7 +47,6 @@ "review" : "рецензирование", "form filling" : "заполнение форм", "comment" : "комментирование", - "custom filter" : "пользовательский фильтр", "download" : "скачивание", "Server settings" : "Настройки сервера", "Common settings" : "Общие настройки", diff --git a/l10n/sv.js b/l10n/sv.js index 736e8142..f824e8b4 100644 --- a/l10n/sv.js +++ b/l10n/sv.js @@ -49,7 +49,6 @@ OC.L10N.register( "review" : "granska", "form filling" : "formulärfyllning", "comment" : "kommentar", - "custom filter" : "anpassat filter", "download" : "ladda ner", "Server settings" : "Serverinställningar", "Common settings" : "Allmänna inställningar", diff --git a/l10n/sv.json b/l10n/sv.json index 69956b00..e5d4052f 100644 --- a/l10n/sv.json +++ b/l10n/sv.json @@ -47,7 +47,6 @@ "review" : "granska", "form filling" : "formulärfyllning", "comment" : "kommentar", - "custom filter" : "anpassat filter", "download" : "ladda ner", "Server settings" : "Serverinställningar", "Common settings" : "Allmänna inställningar", diff --git a/l10n/uk.js b/l10n/uk.js index e1fdfb0a..5c42a329 100644 --- a/l10n/uk.js +++ b/l10n/uk.js @@ -48,7 +48,6 @@ OC.L10N.register( "review": "рецензії", "form filling": "заповнення форм", "comment": "коментарі", - "custom filter": "користувацький фільтр", "download": "звантажити", "Server settings": "Налаштування сервера", "Common settings": "Загальні налаштування", diff --git a/l10n/uk.json b/l10n/uk.json index de91615b..249395dd 100644 --- a/l10n/uk.json +++ b/l10n/uk.json @@ -47,7 +47,7 @@ "review": "рецензії", "form filling": "заповнення форм", "comment": "коментарі", - "custom filter": "користувацький фільтр", + "download": "звантажити", "Server settings": "Налаштування сервера", "Common settings": "Загальні налаштування", diff --git a/l10n/zh_CN.js b/l10n/zh_CN.js index b356622a..a40f8aca 100644 --- a/l10n/zh_CN.js +++ b/l10n/zh_CN.js @@ -49,7 +49,6 @@ OC.L10N.register( "review" : "审阅", "form filling" : "表单填报", "comment" : "评论", - "custom filter" : "自定义筛选器", "download" : "下载", "Server settings" : "服务器设置", "Common settings" : "常用设置", diff --git a/l10n/zh_CN.json b/l10n/zh_CN.json index 3981b395..b8c80a87 100644 --- a/l10n/zh_CN.json +++ b/l10n/zh_CN.json @@ -47,7 +47,6 @@ "review" : "审阅", "form filling" : "表单填报", "comment" : "评论", - "custom filter" : "自定义筛选器", "download" : "下载", "Server settings" : "服务器设置", "Common settings" : "常用设置", From d6ae5c8718d9de82b851eeb877b72559ad4c2652 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Fri, 1 Mar 2024 19:00:02 +0300 Subject: [PATCH 10/14] ru translation --- l10n/ru.js | 1 + l10n/ru.json | 1 + l10n/uk.json | 1 - 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/l10n/ru.js b/l10n/ru.js index 80f1e588..1de595c5 100644 --- a/l10n/ru.js +++ b/l10n/ru.js @@ -49,6 +49,7 @@ OC.L10N.register( "review" : "рецензирование", "form filling" : "заполнение форм", "comment" : "комментирование", + "global filter" : "глобальный фильтр", "download" : "скачивание", "Server settings" : "Настройки сервера", "Common settings" : "Общие настройки", diff --git a/l10n/ru.json b/l10n/ru.json index 27039f65..94457b2f 100644 --- a/l10n/ru.json +++ b/l10n/ru.json @@ -47,6 +47,7 @@ "review" : "рецензирование", "form filling" : "заполнение форм", "comment" : "комментирование", + "global filter" : "глобальный фильтр", "download" : "скачивание", "Server settings" : "Настройки сервера", "Common settings" : "Общие настройки", diff --git a/l10n/uk.json b/l10n/uk.json index 249395dd..318b38f4 100644 --- a/l10n/uk.json +++ b/l10n/uk.json @@ -47,7 +47,6 @@ "review": "рецензії", "form filling": "заповнення форм", "comment": "коментарі", - "download": "звантажити", "Server settings": "Налаштування сервера", "Common settings": "Загальні налаштування", From d8d02264db23b04f6f6e3526dbdd0ffd61d39e43 Mon Sep 17 00:00:00 2001 From: rivexe Date: Mon, 4 Mar 2024 10:12:22 +0300 Subject: [PATCH 11/14] fix: don't zoom the page when the user clicks on the canvas --- js/editor.js | 6 ++++++ js/listener.js | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/js/editor.js b/js/editor.js index 512df2a0..0697cdfc 100644 --- a/js/editor.js +++ b/js/editor.js @@ -267,6 +267,8 @@ if (OCA.Onlyoffice.version > 0) { OCA.Onlyoffice.onRequestHistory(OCA.Onlyoffice.version); } + + OCA.Onlyoffice.setViewport(); }; OCA.Onlyoffice.onRequestSaveAs = function (event) { @@ -661,6 +663,10 @@ OCA.Onlyoffice.docEditor.refreshHistory(data); } + OCA.Onlyoffice.setViewport = function() { + document.querySelector('meta[name="viewport"]').setAttribute("content","width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"); + }; + $(document).ready(OCA.Onlyoffice.InitEditor); })(jQuery, OCA); diff --git a/js/listener.js b/js/listener.js index e7d41af5..12df57f6 100644 --- a/js/listener.js +++ b/js/listener.js @@ -88,12 +88,18 @@ } else { OCA.Onlyoffice.unbindVersionClick(); } + + OCA.Onlyoffice.setViewport(); }; OCA.Onlyoffice.changeFavicon = function (favicon) { $('link[rel="icon"]').attr("href", favicon); }; + OCA.Onlyoffice.setViewport = function() { + document.querySelector('meta[name="viewport"]').setAttribute("content","width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"); + }; + OCA.Onlyoffice.onShowMessage = function (messageObj) { OC.Notification.show(messageObj.message, messageObj.props); } From c12a5da25885c73436ef2eec9c06f372b2329b7e Mon Sep 17 00:00:00 2001 From: rivexe Date: Mon, 4 Mar 2024 10:18:40 +0300 Subject: [PATCH 12/14] fix: saveas file url vulnerability --- controller/editorcontroller.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index db269095..383b4cf9 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -761,6 +761,18 @@ public function save($name, $dir, $url) { return ["error" => $this->trans->t("You don't have enough permission to create")]; } + $documentServerUrl = $this->config->getDocumentServerUrl(); + + if (empty($documentServerUrl)) { + $this->logger->error("documentServerUrl is empty", ["app" => $this->appName]); + return ["error" => $this->trans->t("ONLYOFFICE app is not configured. Please contact admin")]; + } + + if (parse_url($url, PHP_URL_HOST) !== parse_url($documentServerUrl, PHP_URL_HOST)) { + $this->logger->error("Incorrect domain in file url", ["app" => $this->appName]); + return ["error" => $this->trans->t("The domain in the file url does not match the domain of the Document server")]; + } + $url = $this->config->replaceDocumentServerUrlToInternal($url); try { From 53bbc2d14e890b88e804d2df82f4a83bdc04f7cc Mon Sep 17 00:00:00 2001 From: rivexe Date: Mon, 4 Mar 2024 10:19:17 +0300 Subject: [PATCH 13/14] feat: translations added --- l10n/ru.js | 3 ++- l10n/ru.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/l10n/ru.js b/l10n/ru.js index 493ec51a..9ed026a7 100644 --- a/l10n/ru.js +++ b/l10n/ru.js @@ -126,6 +126,7 @@ OC.L10N.register( "Select file to combine" : "Выбрать файл для объединения", "Select data source": "Выбрать источник данных", "The data source must not be the current document": "Источником данных не должен быть текущий документ", - "Enable background connection check to the editors": "Включить фоновую проверку подключения к редакторам" + "Enable background connection check to the editors": "Включить фоновую проверку подключения к редакторам", + "The domain in the file url does not match the domain of the Document server": "Домен в адресе файла не соответствует домену сервера документов" }, "nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);"); diff --git a/l10n/ru.json b/l10n/ru.json index 7fca1dc2..dbbbe8d2 100644 --- a/l10n/ru.json +++ b/l10n/ru.json @@ -124,6 +124,7 @@ "Select file to combine" : "Выбрать файл для объединения", "Select data source": "Выбрать источник данных", "The data source must not be the current document": "Источником данных не должен быть текущий документ", - "Enable background connection check to the editors": "Включить фоновую проверку подключения к редакторам" + "Enable background connection check to the editors": "Включить фоновую проверку подключения к редакторам", + "The domain in the file url does not match the domain of the Document server": "Домен в адресе файла не соответствует домену сервера документов" },"pluralForm" :"nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);" } \ No newline at end of file From 35311949e85ac2de835378430a131d4ccab848ed Mon Sep 17 00:00:00 2001 From: rivexe Date: Mon, 4 Mar 2024 13:13:59 +0300 Subject: [PATCH 14/14] fix: user id in avatar url --- controller/editorcontroller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index 4fe95373..b2d97e77 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -452,7 +452,7 @@ public function userInfo($userIds) { $this->urlGenerator->linkToRoute( "core.avatar.getAvatar", [ - "userId" => $userId, + "userId" => $user->getUID(), "size" => 64, ] )