mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-07-15 10:55:23 +02:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user