Skip to content

Commit 02edd6a

Browse files
committed
fix: remove Route53 endpoint override and pin AWS SDK to an aged version
The endpoint field let anyone with dnsProvider create permission point the AWS SDK at an arbitrary URL (loopback, link-local, internal network, cloud metadata), turning testConnection and every other Route53 operation into an SSRF oracle. There's no way to keep LocalStack-style testing working while blocking that, since the target address is identical either way, so the field is removed entirely rather than validated. Route53 always talks to real AWS now. Also pin @aws-sdk/client-route-53 to ^3.1097.0 (matching the existing client-secrets-manager pin) instead of whatever caret-latest resolved to at install time. The version that landed in the merged PR was published less than a day before this, which violates the minimumReleaseAge policy that merged into canary around the same time and broke the Docker build.
1 parent a60b0af commit 02edd6a

6 files changed

Lines changed: 227 additions & 150 deletions

File tree

‎apps/dokploy/components/dashboard/settings/dns/handle-dns-provider.tsx‎

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ const DnsProviderSchema = z.object({
5353
apiToken: z.string(),
5454
accessKeyId: z.string(),
5555
secretAccessKey: z.string(),
56-
endpoint: z.string(),
5756
});
5857

5958
type DnsProviderForm = z.infer<typeof DnsProviderSchema>;
@@ -64,7 +63,6 @@ const defaultValues: DnsProviderForm = {
6463
apiToken: "",
6564
accessKeyId: "",
6665
secretAccessKey: "",
67-
endpoint: "",
6866
};
6967

7068
const buildConfig = (data: DnsProviderForm) => {
@@ -79,7 +77,6 @@ const buildConfig = (data: DnsProviderForm) => {
7977
providerType: "route53" as const,
8078
accessKeyId: data.accessKeyId,
8179
secretAccessKey: data.secretAccessKey,
82-
endpoint: data.endpoint || undefined,
8380
};
8481
}
8582
};
@@ -137,7 +134,6 @@ export const HandleDnsProvider = ({ dnsProviderId }: Props) => {
137134
...(provider.config.providerType === "route53" && {
138135
accessKeyId: provider.config.accessKeyId,
139136
secretAccessKey: provider.config.secretAccessKey,
140-
endpoint: provider.config.endpoint ?? "",
141137
}),
142138
});
143139
} else if (!dnsProviderId) {
@@ -320,23 +316,6 @@ export const HandleDnsProvider = ({ dnsProviderId }: Props) => {
320316
</FormItem>
321317
)}
322318
/>
323-
<FormField
324-
control={form.control}
325-
name="endpoint"
326-
render={({ field }) => (
327-
<FormItem>
328-
<FormLabel>Endpoint (optional)</FormLabel>
329-
<FormControl>
330-
<Input placeholder="http://localhost:4566" {...field} />
331-
</FormControl>
332-
<FormDescription>
333-
Only for a LocalStack/API-compatible emulator. Leave
334-
empty to use AWS.
335-
</FormDescription>
336-
<FormMessage />
337-
</FormItem>
338-
)}
339-
/>
340319
</>
341320
)}
342321

‎apps/dokploy/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"@ai-sdk/mistral": "^3.0.20",
4848
"@ai-sdk/openai": "^3.0.29",
4949
"@ai-sdk/openai-compatible": "^2.0.30",
50-
"@aws-sdk/client-route-53": "^3.1108.0",
50+
"@aws-sdk/client-route-53": "^3.1097.0",
5151
"@aws-sdk/client-secrets-manager": "^3.1097.0",
5252
"@better-auth/api-key": "1.6.23",
5353
"@better-auth/passkey": "1.6.23",

‎packages/server/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"@ai-sdk/mistral": "^3.0.20",
3838
"@ai-sdk/openai": "^3.0.29",
3939
"@ai-sdk/openai-compatible": "^2.0.30",
40-
"@aws-sdk/client-route-53": "^3.1108.0",
40+
"@aws-sdk/client-route-53": "^3.1097.0",
4141
"@aws-sdk/client-secrets-manager": "^3.1097.0",
4242
"@better-auth/api-key": "1.6.23",
4343
"@better-auth/passkey": "1.6.23",

‎packages/server/src/db/schema/dns-provider.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ export const route53DnsConfigSchema = z.object({
1818
providerType: z.literal("route53"),
1919
accessKeyId: z.string().trim().min(1),
2020
secretAccessKey: z.string().trim().min(1),
21-
endpoint: z.string().trim().url().optional(),
2221
});
2322

2423
export const dnsProviderConfigSchema = z.discriminatedUnion("providerType", [

‎packages/server/src/utils/dns/route53.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ const createClient = (config: Route53Config) =>
1818
accessKeyId: config.accessKeyId,
1919
secretAccessKey: config.secretAccessKey,
2020
},
21-
...(config.endpoint && { endpoint: config.endpoint }),
2221
});
2322

2423
const stripTrailingDot = (name: string) => name.replace(/\.$/, "");

0 commit comments

Comments
 (0)