ValidationError not caught in SelfHandlingForm
Bug #958971 reported by
Gabriel Hurley
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Dashboard (Horizon) |
Fix Released
|
Critical
|
Gabriel Hurley |
Bug Description
The SelfHandlingForm code is calling the clean() method in order to get the form's cleaned data. This is not only redundant (as the call to is_valid above takes care of cleaning the data), it's dangerous, since the standard way to trigger a validation error for a condition which applies to multiple fields in Django is to raise ValidationError in the clean() method, which is *not* caught in the Horizon code.
The correct way to access the data is to use form.cleaned_data after calling form.is_valid().
Changed in horizon: | |
status: | Fix Committed → Fix Released |
Changed in horizon: | |
milestone: | essex-rc1 → 2012.1 |
To post a comment you must log in.
Fix proposed to branch: master /review. openstack. org/5495
Review: https:/