-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sending an empty body will bypass the validation #10
Comments
I'm going to reproduce and push a fix soon. Thanks, @Alexandre-Fernandez to report it. |
@Alexandre-Fernandez I couldn't reproduce this issue. If you could provide me with these details that would be great PHP version Meanwhile, I can see 4 ways to bypass resolving and validating the input argument: |
I tried making a reproduction repository and after further testing it seems that this only happens when the |
Thanks @Alexandre-Fernandez, You're right this is actually a bug. I will fix it and release a patch soon |
Issue fixed. throw UnsupportedMediaTypeHttpException in case Content-Type header is missing or unsupported. |
great thanks |
Sending a POST request with an empty body will bypass the validation and still call the controller, even if your DTO has
#[Assert\NotBlank]
decorators. This is counter intuitive and can lead to bugs since the controller is expecting a filled DTO.The text was updated successfully, but these errors were encountered: