In Django 1.10 a new Form property was introduced, defaulting to True,
which enabled HTML form validation for fields marked "required" in
Django. This changed old behavior, which was that required fields were
only validated server-side. This patch restores old behavior by setting
use_required_attribute to False for the inherited AuthenticationForm.
This problem arose because when WebSSO is enabled and a
non-keystone-credentials authentication method is selected from the
dropdown list, the now-hidden username and password fields are still
marked "required" and still validated client-side, even though they are
invisible to the user and cannot be filled in. It would be nice to fix
the javascript to properly turn the "required" attribute on or off
depending on what authentication method is selected and whether the
"required" fields are even visible, but for now this just restores the
behavior we had before Djanto 1.10.
Change-Id: I3e798a2288d9c33396b40a86b07ea8c163d3b525
Closes-bug: #1703109
(cherry picked from commit 1fa9ae26cc6006f8ee94fabddb7fea171adee55d)
Reviewed: https:/ /review. openstack. org/534409 /git.openstack. org/cgit/ openstack/ django_ openstack_ auth/commit/ ?id=04491deed11 022c29e24a02e69 d750e981a7ac7a
Committed: https:/
Submitter: Zuul
Branch: stable/pike
commit 04491deed11022c 29e24a02e69d750 e981a7ac7a
Author: Colleen Murphy <email address hidden>
Date: Thu Nov 2 18:19:09 2017 +0100
Don't add required attribute to html form fields
In Django 1.10 a new Form property was introduced, defaulting to True, required_ attribute to False for the inherited AuthenticationForm.
which enabled HTML form validation for fields marked "required" in
Django. This changed old behavior, which was that required fields were
only validated server-side. This patch restores old behavior by setting
use_
This problem arose because when WebSSO is enabled and a keystone- credentials authentication method is selected from the
non-
dropdown list, the now-hidden username and password fields are still
marked "required" and still validated client-side, even though they are
invisible to the user and cannot be filled in. It would be nice to fix
the javascript to properly turn the "required" attribute on or off
depending on what authentication method is selected and whether the
"required" fields are even visible, but for now this just restores the
behavior we had before Djanto 1.10.
Change-Id: I3e798a2288d9c3 3396b40a86b07ea 8c163d3b525 8ee94fabddb7fea 171adee55d)
Closes-bug: #1703109
(cherry picked from commit 1fa9ae26cc6006f