fix(certificates): improve validation and prevent crash (#2910)
This commit is contained in:
1 parent
3172e6e0c4
commit
c51424717d
5 files changed
+72
-24
No files matched your search
@@ -24,7 +24,7 @@ export const superRefineCertificateFile = (value: File | null, context: z.Refine
|
||||
});
|
||||
}
|
||||
|
||||
if (value.type !== "application/x-x509-ca-cert" && value.type !== "application/pkix-cert") {
|
||||
if (!value.name.endsWith(".crt") && !value.name.endsWith(".pem")) {
|
||||
return context.addIssue({
|
||||
code: "custom",
|
||||
params: createCustomErrorParams({
|
||||
|
||||
Reference in new issue
Block a user