Pattern: Use of exclude
attribute in ModelForm.Meta
.
Issue: -
Checks dangerous use of the exclude
attribute in ModelForm.Meta
.
It is strongly recommended that you explicitly set all fields that should be edited in the form using the fields attribute. Failure to do so can easily lead to security problems when a form unexpectedly allows a user to set certain fields, especially when new fields are added to a model. Depending on how the form is rendered, the problem may not even be visible on the web page.