21099 api serverside validation check
This commit is contained in:
@@ -1087,7 +1087,7 @@ export const RenderFileUpload = (field) => {
|
||||
setRejectedFiles([]); // Clear any previously rejected file errorsss
|
||||
};
|
||||
|
||||
const FILENAME_ALLOWED = /^[A-Za-z0-9 ._\-()]+$/;
|
||||
const FILENAME_ALLOWED = /^[A-Za-z0-9 ._\-:()]+$/;
|
||||
|
||||
const validateFilename = (file, t) => {
|
||||
const name = file.name;
|
||||
@@ -1112,8 +1112,8 @@ export const RenderFileUpload = (field) => {
|
||||
};
|
||||
}
|
||||
|
||||
// block characters < > : " / \ | ? *
|
||||
if (/[<>:"/\\|?*]/.test(name)) {
|
||||
// block characters < > " / \ | ? *
|
||||
if (/[<>"/\\|?*]/.test(name)) {
|
||||
return {
|
||||
code: "filename-invalid-chars",
|
||||
message: `${name} ${t(
|
||||
|
||||
Reference in New Issue
Block a user