Tuesday, October 29, 2019

FormSet.is_valid() raises ValidationError

Hi,

From what I understand, Form.is_valid() must return False when the form is invalid or incomplete.

BaseFormSet, however, raises a ValidationError with the message "ManagementForm data is missing or has been tampered with,"  when the management form has been tampered.

I think this is incorrect: BaseFormSet.is_valid() should catch this exception and return False; otherwise, it allows a malicious user to cause an error 500 by tampering the management form.

Best regards,
Benoit Blanchon
(Django version: 2.2.6)

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/04a02408-3fb8-4b96-a5dc-980935146f76%40googlegroups.com.

No comments:

Post a Comment