Skip to content

Commit

Permalink
Limit filename size to 255 chars for link + attachment types
Browse files Browse the repository at this point in the history
  • Loading branch information
whabanks committed Jan 9, 2025
1 parent 6b3c603 commit ba463c6
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions app/schema_validation/definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,9 @@
"binaryEncoding": "base64",
},
"sending_method": {"type": "string", "enum": ["attach", "link"]},
"filename": {"minLength": 3, "maxLength": 255},
},
"required": ["file", "sending_method"],
"if": {"properties": {"sending_method": {"const": "attach"}}},
"then": {
"required": ["filename"],
"properties": {"filename": {"minLength": 3, "maxLength": 255}},
},
"required": ["file", "filename", "sending_method"],
}
},
}
Expand Down

0 comments on commit ba463c6

Please sign in to comment.