feat(validation): enhance registry URL validation in schema

- Introduced a new validation schema for registry URLs, ensuring they conform to a specific format (hostname[:port]) and disallow shell metacharacters.
- Updated the `createSchema`, `apiCreateRegistry`, and `apiTestRegistry` functions to utilize the new registry URL validation.
- Improved security and input integrity for registry URL fields.
- Updated the `removeRegistry` function to escape the registry URL during logout to prevent command injection vulnerabilities.
This commit is contained in:
Mauricio Siu
2026-05-09 01:09:50 -06:00
parent b9e97eb321
commit 547ba2d04b
2 changed files with 15 additions and 4 deletions

View File

@@ -85,7 +85,7 @@ export const removeRegistry = async (registryId: string) => {
}
if (!IS_CLOUD) {
await execAsync(`docker logout ${response.registryUrl}`);
await execAsync(`docker logout ${shEscape(response.registryUrl)}`);
}
return response;