21158466 openstack_auth login page needs cookies
authorAndrew Balfour <Andrew.Balfour@Oracle.COM>
Mon, 22 Jun 2015 13:51:09 -0700
changeset 4515 4d9a2ebf66e9
parent 4513 9fdf636dfbf4
child 4516 50b76d78389e
21158466 openstack_auth login page needs cookies
components/python/django_openstack_auth/patches/01-set-test-cookie.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/python/django_openstack_auth/patches/01-set-test-cookie.patch	Mon Jun 22 13:51:09 2015 -0700
@@ -0,0 +1,16 @@
+In-house patch to fix authenticaton 'failing' because of lack of cookie
+support simply because the cookie was never set. This patch is unlikely
+to be unsuitable for upstream, and should be removed when Django is
+updated to 1.6.11 or greater, as the problem disappears with that
+version.
+
+--- django_openstack_auth-1.1.9/openstack_auth/forms.py.orig	2015-06-19 15:03:16.425066412 -0700
++++ django_openstack_auth-1.1.9/openstack_auth/forms.py	2015-06-19 15:05:16.267455199 -0700
[email protected]@ -71,6 +71,7 @@
+         elif len(self.fields['region'].choices) > 1:
+             self.fields['region'].initial = self.request.COOKIES.get(
+                 'login_region')
++    self.request.session.set_test_cookie()
+
+     @staticmethod
+     def get_region_choices():