fix(api): validate push and domain verification targets (#2346)

This commit is contained in:
Hampus authored and GitHub committed 2026-09-02 17:23:34 +02:00
1 parent 693aec2b4d
commit 1d84689b45
5 files changed
+75 -3

No files matched your search

@@ -514,6 +514,13 @@ export const RegisterMobileDeviceRequest = z
})
.superRefine((value, ctx) => {
if (value.platform !== 'android_unified_push') return;
if (!URLType.safeParse(value.token).success) {
ctx.addIssue({
code: z.ZodIssueCode.custom,
path: ['token'],
message: 'UnifiedPush registrations require a valid endpoint URL',
});
}
if (!value.encryption_key) {
ctx.addIssue({
code: z.ZodIssueCode.custom,