diff --git a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/model/rm/local/LocalResourceController.java b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/model/rm/local/LocalResourceController.java index 5daf0a8d8e..ff261363a1 100644 --- a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/model/rm/local/LocalResourceController.java +++ b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/model/rm/local/LocalResourceController.java @@ -685,7 +685,6 @@ public void deleteResource(@NotNull String projectId, @NotNull String resourcePa if (log.isDebugEnabled()) { log.debug("Removing resource from '" + resourcePath + "' in project '" + projectId + "'" + (recursive ? " recursive" : "")); } - validateResourcePath(resourcePath); Path targetPath = getTargetPath(projectId, resourcePath); doFileWriteOperation(projectId, targetPath, () -> { if (!Files.exists(targetPath)) { diff --git a/webapp/packages/core-connections/src/ConnectionFolderResource.ts b/webapp/packages/core-connections/src/ConnectionFolderResource.ts index 63bbab8571..9b3b5df782 100644 --- a/webapp/packages/core-connections/src/ConnectionFolderResource.ts +++ b/webapp/packages/core-connections/src/ConnectionFolderResource.ts @@ -31,7 +31,7 @@ export interface IConnectionFolderParam { folderId: string; } -export const CONNECTION_FOLDER_NAME_VALIDATION = /^(?!\.)[^\\/:\\"]+$/u; +export const CONNECTION_FOLDER_NAME_VALIDATION = /^(?!\.)[^\\/:\\"'<>|?*]+$/u; export const ConnectionFolderProjectKey = resourceKeyAliasFactory('@connection-folder/project', (projectId: string) => ({ projectId })); diff --git a/webapp/packages/core-connections/src/locales/en.ts b/webapp/packages/core-connections/src/locales/en.ts index b0731a2c43..ec5ed27da8 100644 --- a/webapp/packages/core-connections/src/locales/en.ts +++ b/webapp/packages/core-connections/src/locales/en.ts @@ -54,7 +54,7 @@ export default [ ['connections_connection_edit_search_hosts', 'Host names'], ['connections_connection_address', 'Address'], ['connections_connection_folder', 'Folder'], - ['connections_connection_folder_validation', "Folder's name may not contain the following symbols / : \" \\ and can't start with a dot"], + ['connections_connection_folder_validation', "Folder's name may not contain the following symbols / : \" \\ ' <> | ? * and can't start with a dot"], ['connections_connection_name', 'Connection name'], ['connections_connection_access_user_or_team_name', 'User or Team name'], ['connections_connection_access_filter_placeholder', 'Search for user or team name'], diff --git a/webapp/packages/core-connections/src/locales/fr.ts b/webapp/packages/core-connections/src/locales/fr.ts index 9ec17f2af7..7cb705fa07 100644 --- a/webapp/packages/core-connections/src/locales/fr.ts +++ b/webapp/packages/core-connections/src/locales/fr.ts @@ -59,12 +59,15 @@ export default [ ['connections_connection_folder', 'Dossier'], [ 'connections_connection_folder_validation', - 'Le nom du dossier ne peut pas contenir les symboles suivants : / : " \\ et ne peut pas commencer par un point', + 'Le nom du dossier ne peut pas contenir les symboles suivants / : " \\ \' <> | ? * et ne peut pas commencer par un point', ], ['connections_connection_name', 'Nom de la connexion'], ['connections_connection_access_user_or_team_name', "Nom de l'utilisateur ou de l'équipe"], ['connections_connection_access_filter_placeholder', "Rechercher un nom d'utilisateur ou d'équipe"], - ['connections_connection_access_admin_info', "Les administrateurs voient toutes les connexions à l'exception des connexions privées des autres utilisateurs."], + [ + 'connections_connection_access_admin_info', + "Les administrateurs voient toutes les connexions à l'exception des connexions privées des autres utilisateurs.", + ], ['connections_connection_description', 'Description'], ['connections_connection_project', 'Projet'], ['connections_connection_driver', 'Pilote'], diff --git a/webapp/packages/core-connections/src/locales/it.ts b/webapp/packages/core-connections/src/locales/it.ts index 906713a88f..1d2dd96482 100644 --- a/webapp/packages/core-connections/src/locales/it.ts +++ b/webapp/packages/core-connections/src/locales/it.ts @@ -51,7 +51,7 @@ export default [ ['connections_connection_edit_search_hosts', 'Host names'], ['connections_connection_address', 'Indirizzo'], ['connections_connection_folder', 'Folder'], - ['connections_connection_folder_validation', "Folder's name may not contain the following symbols / : \" \\ and can't start with a dot"], + ['connections_connection_folder_validation', "Folder's name may not contain the following symbols / : \" \\ ' <> | ? * and can't start with a dot"], ['connections_connection_name', 'Nome della connessione'], ['connections_connection_access_revoke', 'Revoca'], ['connections_connection_access_grant', 'Permetti'], diff --git a/webapp/packages/core-connections/src/locales/ru.ts b/webapp/packages/core-connections/src/locales/ru.ts index f93384e221..76ad21656b 100644 --- a/webapp/packages/core-connections/src/locales/ru.ts +++ b/webapp/packages/core-connections/src/locales/ru.ts @@ -58,7 +58,7 @@ export default [ ['connections_connection_edit_search_hosts', 'Названия хостов'], ['connections_connection_address', 'Адрес'], ['connections_connection_folder', 'Папка'], - ['connections_connection_folder_validation', 'Имя папки не может содержать следующие символы / : " \\ и не может начинаться с точки'], + ['connections_connection_folder_validation', 'Имя папки не может содержать следующие символы / : " \\ \' <> | ? * и не может начинаться с точки'], ['connections_connection_name', 'Название подключения'], ['connections_connection_access_user_or_team_name', 'Имя пользователя или команды'], ['connections_connection_access_filter_placeholder', 'Поиск по имени пользователя или команде'], diff --git a/webapp/packages/core-connections/src/locales/zh.ts b/webapp/packages/core-connections/src/locales/zh.ts index a97d32b363..2b0e0840e6 100644 --- a/webapp/packages/core-connections/src/locales/zh.ts +++ b/webapp/packages/core-connections/src/locales/zh.ts @@ -52,7 +52,7 @@ export default [ ['connections_connection_edit_search_hosts', '主机名称'], ['connections_connection_address', '地址'], ['connections_connection_folder', 'Folder'], - ['connections_connection_folder_validation', "Folder's name may not contain the following symbols / : \" \\ and can't start with a dot"], + ['connections_connection_folder_validation', "Folder's name may not contain the following symbols / : \" \\ ' <> | ? * and can't start with a dot"], ['connections_connection_name', '连接名称'], ['connections_connection_access_admin_info', 'Administrators see all connections except private connections of other users.'], ['connections_connection_description', '描述'], diff --git a/webapp/packages/plugin-resource-manager-scripts/src/locales/en.ts b/webapp/packages/plugin-resource-manager-scripts/src/locales/en.ts index 765755d93e..53daab31a8 100644 --- a/webapp/packages/plugin-resource-manager-scripts/src/locales/en.ts +++ b/webapp/packages/plugin-resource-manager-scripts/src/locales/en.ts @@ -1,3 +1,10 @@ +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ export default [ ['plugin_resource_manager_scripts_action_enable_label', 'Show scripts'], ['plugin_resource_manager_scripts_title', 'Scripts'], @@ -5,7 +12,7 @@ export default [ ['plugin_resource_manager_scripts_save_script', 'Save script'], [ 'plugin_resource_manager_scripts_script_name_invalid_characters_message', - "Script's name may not contain the following symbols / : \" \\ and can't start with a dot", + "Script's name may not contain the following symbols / : \" \\ ' <> | ? * and can't start with a dot", ], [ 'plugin_resource_manager_scripts_save_script_project_restriction_descripion', diff --git a/webapp/packages/plugin-resource-manager-scripts/src/locales/fr.ts b/webapp/packages/plugin-resource-manager-scripts/src/locales/fr.ts index e576064868..b7c4cfaa50 100644 --- a/webapp/packages/plugin-resource-manager-scripts/src/locales/fr.ts +++ b/webapp/packages/plugin-resource-manager-scripts/src/locales/fr.ts @@ -12,7 +12,7 @@ export default [ ['plugin_resource_manager_scripts_save_script', 'Enregistrer le script'], [ 'plugin_resource_manager_scripts_script_name_invalid_characters_message', - 'Le nom du script ne peut pas contenir les symboles suivants : / \\ \\ et ne peut pas commencer par un point', + 'Le nom du script ne peut pas contenir les symboles suivants / : " \\ \' <> | ? * et ne peut pas commencer par un point', ], [ 'plugin_resource_manager_scripts_save_script_project_restriction_description', diff --git a/webapp/packages/plugin-resource-manager-scripts/src/locales/it.ts b/webapp/packages/plugin-resource-manager-scripts/src/locales/it.ts index 765755d93e..53daab31a8 100644 --- a/webapp/packages/plugin-resource-manager-scripts/src/locales/it.ts +++ b/webapp/packages/plugin-resource-manager-scripts/src/locales/it.ts @@ -1,3 +1,10 @@ +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ export default [ ['plugin_resource_manager_scripts_action_enable_label', 'Show scripts'], ['plugin_resource_manager_scripts_title', 'Scripts'], @@ -5,7 +12,7 @@ export default [ ['plugin_resource_manager_scripts_save_script', 'Save script'], [ 'plugin_resource_manager_scripts_script_name_invalid_characters_message', - "Script's name may not contain the following symbols / : \" \\ and can't start with a dot", + "Script's name may not contain the following symbols / : \" \\ ' <> | ? * and can't start with a dot", ], [ 'plugin_resource_manager_scripts_save_script_project_restriction_descripion', diff --git a/webapp/packages/plugin-resource-manager-scripts/src/locales/ru.ts b/webapp/packages/plugin-resource-manager-scripts/src/locales/ru.ts index 4d1a324482..1c72effe44 100644 --- a/webapp/packages/plugin-resource-manager-scripts/src/locales/ru.ts +++ b/webapp/packages/plugin-resource-manager-scripts/src/locales/ru.ts @@ -1,3 +1,10 @@ +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ export default [ ['plugin_resource_manager_scripts_action_enable_label', 'Показывать скрипты'], ['plugin_resource_manager_scripts_title', 'Скрипты'], @@ -5,7 +12,7 @@ export default [ ['plugin_resource_manager_scripts_save_script', 'Сохранить скрипт'], [ 'plugin_resource_manager_scripts_script_name_invalid_characters_message', - 'Имя скрипта не может содержать следующие символы / : " \\ и не может начинаться с точки', + 'Имя скрипта не может содержать следующие символы / : " \\ \' <> | ? * и не может начинаться с точки', ], ['plugin_resource_manager_scripts_save_script_project_restriction_descripion', 'Проект скрипта не может отличаться от проекта подключения'], ]; diff --git a/webapp/packages/plugin-resource-manager-scripts/src/locales/zh.ts b/webapp/packages/plugin-resource-manager-scripts/src/locales/zh.ts index 90cee7bf47..ca607880f0 100644 --- a/webapp/packages/plugin-resource-manager-scripts/src/locales/zh.ts +++ b/webapp/packages/plugin-resource-manager-scripts/src/locales/zh.ts @@ -1,3 +1,10 @@ +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ export default [ ['plugin_resource_manager_scripts_action_enable_label', 'Show scripts'], ['plugin_resource_manager_scripts_title', 'Scripts'], @@ -5,7 +12,7 @@ export default [ ['plugin_resource_manager_scripts_save_script', '保存脚本'], [ 'plugin_resource_manager_scripts_script_name_invalid_characters_message', - "Script's name may not contain the following symbols / : \" \\ and can't start with a dot", + "Script's name may not contain the following symbols / : \" \\ ' <> | ? * and can't start with a dot", ], [ 'plugin_resource_manager_scripts_save_script_project_restriction_descripion', diff --git a/webapp/packages/plugin-resource-manager/src/RESOURCE_NAME_REGEX.ts b/webapp/packages/plugin-resource-manager/src/RESOURCE_NAME_REGEX.ts index 51f7216273..523a0b43dc 100644 --- a/webapp/packages/plugin-resource-manager/src/RESOURCE_NAME_REGEX.ts +++ b/webapp/packages/plugin-resource-manager/src/RESOURCE_NAME_REGEX.ts @@ -6,4 +6,4 @@ * you may not use this file except in compliance with the License. */ -export const RESOURCE_NAME_REGEX = /^(?!\.)[^\\/:\\"]+$/u; +export const RESOURCE_NAME_REGEX = /^(?!\.)[^\\/:\\"'<>|?*]+$/u;