Skip to content

Commit d71fabf

Browse files
authored
chore: set limit for max number of characters when reporting problem with response. Also prevent base64 encoded string from being accepted (#258)
1 parent 2459658 commit d71fabf

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/operations/reportSubmission.v1.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ const validationSchema: Schema = {
2525
exists: { bail: true, errorMessage: "Missing description property" },
2626
isString: true,
2727
isLength: {
28-
options: { min: 10 },
29-
errorMessage: "Must be at least 10 characters long",
28+
options: { min: 10, max: 1000 },
29+
errorMessage: "Text length must be between 10 and 1000 characters",
3030
},
3131
escape: true,
32+
isBase64: { negated: true },
3233
},
3334
preferredLanguage: {
3435
exists: { bail: true, errorMessage: "Missing preferredLanguage property" },

0 commit comments

Comments
 (0)