From 9b9081bb02c79cb2dc5e2c50f3576780363474d0 Mon Sep 17 00:00:00 2001 From: Damien <damien.burel@maarch.org> Date: Thu, 16 Apr 2020 14:38:09 +0200 Subject: [PATCH] FEAT #13779 TIME 0:35 multiple paths for onlyoffice + fixes --- rest/index.php | 1 + .../contentManagement/controllers/OnlyOfficeController.php | 5 ++++- src/frontend/lang/lang-fr.ts | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/rest/index.php b/rest/index.php index e46ddaafa56..5c424d0a68c 100755 --- a/rest/index.php +++ b/rest/index.php @@ -418,6 +418,7 @@ $app->post('/resourcesList/users/{userId}/groups/{groupId}/baskets/{basketId}/ac $app->post('/resourcesList/users/{userId}/groups/{groupId}/baskets/{basketId}/actions/{actionId}/checkRejectVisa', \Action\controllers\PreProcessActionController::class . ':checkRejectVisa'); $app->post('/resourcesList/users/{userId}/groups/{groupId}/baskets/{basketId}/actions/{actionId}/checkInterruptResetVisa', \Action\controllers\PreProcessActionController::class . ':checkInterruptResetVisa'); $app->post('/resourcesList/users/{userId}/groups/{groupId}/baskets/{basketId}/actions/{actionId}/checkCloseWithFieldsAction', \Action\controllers\PreProcessActionController::class . ':checkCloseWithFieldsAction'); +$app->post('/resourcesList/users/{userId}/groups/{groupId}/baskets/{basketId}/actions/{actionId}/checkReconcile', \Action\controllers\PreProcessActionController::class . ':checkReconcile'); $app->post('/resourcesList/users/{userId}/groups/{groupId}/baskets/{basketId}/actions/{actionId}/checkSendAlfresco', \Action\controllers\PreProcessActionController::class . ':checkSendAlfresco'); //Search diff --git a/src/app/contentManagement/controllers/OnlyOfficeController.php b/src/app/contentManagement/controllers/OnlyOfficeController.php index 24c5e4a9434..97fa04ac849 100644 --- a/src/app/contentManagement/controllers/OnlyOfficeController.php +++ b/src/app/contentManagement/controllers/OnlyOfficeController.php @@ -202,9 +202,12 @@ class OnlyOfficeController $checkUrl = str_replace('http://', '', $queryParams['url']); $checkUrl = str_replace('https://', '', $checkUrl); $uri = (string)$loadedXml->onlyoffice->server_uri; + $uriPaths = explode('/', $uri, 2); + $masterPath = $uriPaths[0]; + $lastPath = !empty($uriPaths[1]) ? "/{$uriPaths[1]}" : ''; $port = (string)$loadedXml->onlyoffice->server_port; - if (strpos($checkUrl, "{$uri}:{$port}/cache/files/") !== 0 && (($port != 80 && $port != 443) || strpos($checkUrl, "{$uri}/cache/files/") !== 0)) { + if (strpos($checkUrl, "{$masterPath}:{$port}{$lastPath}/cache/files/") !== 0 && (($port != 80 && $port != 443) || strpos($checkUrl, "{$masterPath}{$lastPath}/cache/files/") !== 0)) { return $response->withStatus(400)->withJson(['errors' => 'Query params url is not allowed']); } diff --git a/src/frontend/lang/lang-fr.ts b/src/frontend/lang/lang-fr.ts index 772a7851c8c..64d47ddc9e9 100755 --- a/src/frontend/lang/lang-fr.ts +++ b/src/frontend/lang/lang-fr.ts @@ -116,7 +116,7 @@ export const LANG_FR = { "admissionDate": "Date d'admission", "adrPriority": "Priorité de séquence", "missingAlfrescoConfig" : "La configuration Alfresco est désactivée ou incomplète", - "alreadySentToAlfresco" : "Courrier deja envoyé à Alfresco", + "alreadySentToAlfresco" : "Courrier déjà envoyé à Alfresco", "notEnoughAlfrescoInformations" : "Des informations Alfresco sont manquantes pour l'entité primaire de l'utilisateur", "afterClickingSendLinkChangePassword": "Après avoir cliqué sur <b>Envoyer</b>, vous recevrez un courriel contenant un lien pour modifier votre mot de passe. Ce lien sera actif <b>1 heure</b>.", "alignCenter": "Centre", -- GitLab