From 2700d9accc92f7d3fd862bfc465f66237c87b79d Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Wed, 7 Oct 2020 11:42:59 +0200 Subject: [PATCH] Replace ocsapp prefix in security:routes Replace "/ocsapp/" with "/ocs/v{version.php}/" in the security:routes output. Signed-off-by: Vincent Petry --- core/Command/Security/ListRoutes.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/Command/Security/ListRoutes.php b/core/Command/Security/ListRoutes.php index 8353720482694..e0427e3eb3a58 100644 --- a/core/Command/Security/ListRoutes.php +++ b/core/Command/Security/ListRoutes.php @@ -90,6 +90,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int if (isset($rows[$path])) { $rows[$path]['methods'] = \array_unique(\array_merge($rows[$path]['methods'], $route->getMethods())); } else { + if (substr($path, 0, 8) === '/ocsapp/') { + $path = '/ocs/v{version}.php/' . substr($path, 8); + } $rows[$path] = [ 'path' => $path, 'methods' => $route->getMethods()