21158466 openstack_auth login page needs cookies s11-update
authorAndrew Balfour <Andrew.Balfour@Oracle.COM>
Mon, 22 Jun 2015 16:13:26 -0700
branchs11-update
changeset 4519 6388f5bc4fe5
parent 4514 d5eea6257d67
child 4521 983757fe4291
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 16:13:26 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
+@@ -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():