You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On this owasp page we can see Set a filename length limit. Restrict the allowed characters if possible.
I could be interesting to add an option in the File Constraint to check that ?
If yes, I can create a MR for that.
Example
For example we can have :
// src/Entity/Author.phpnamespaceApp\Entity;
useSymfony\Component\Validator\ConstraintsasAssert;
class Author
{
#[Assert\File(
maxSize: '1024k',
filenameMaxLength: 50,
filenameMaxLengthMessage: 'The filename is too long. It should have 50 character or less.'
)]
protected$bioFile;
}