Reviewed: https://review.opendev.org/c/openstack/horizon/+/827887 Committed: https://opendev.org/openstack/horizon/commit/88dd887ad3284601f0acec89cf52265602a70c8c Submitter: "Zuul (22348)" Branch: master
commit 88dd887ad3284601f0acec89cf52265602a70c8c Author: Radomir Dopieralski <[email protected]> Date: Fri Feb 4 18:01:17 2022 +0100 Fix getting defaults from cookie for region field in password form Since the normal form doesn't have a request attribute, we have to pass the initial value for the region from the view. Change-Id: Icea647ad13718b74528922f362ad665be1392e9b Closes-bug: #1957926 ** Changed in: horizon Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Dashboard (Horizon). https://bugs.launchpad.net/bugs/1957926 Title: horizon crashes on password expire reset request (multiregion) Status in OpenStack Dashboard (Horizon): Fix Released Bug description: versions: general: wallaby horizon: 19.2.1.dev12 keystone: 19.0.1.dev11 os: ubuntu 20.04.3 LTS installed from source: yes deployment method: kolla-ansible keystone config: [security_compliance] change_password_upon_first_use = true horizon config (local_settings): ALLOW_USERS_CHANGE_EXPIRED_PASSWORD = True multiregion: YES, single keystone/horizon with multiple regions Problem: When creating a new user and trying to login with said user horizon crashes with the following trace: [Thu Jan 13 11:48:09.243737 2022] [wsgi:error] [pid 699:tid 139676869314304] [remote x:35360] Traceback (most recent call last): [Thu Jan 13 11:48:09.243741 2022] [wsgi:error] [pid 699:tid 139676869314304] [remote x:35360] File "/var/lib/kolla/venv/lib/python3.8/site-packages/django/core/handlers/exception.py", line 34, in inner [Thu Jan 13 11:48:09.243744 2022] [wsgi:error] [pid 699:tid 139676869314304] [remote x:35360] response = get_response(request) [Thu Jan 13 11:48:09.243747 2022] [wsgi:error] [pid 699:tid 139676869314304] [remote x:35360] File "/var/lib/kolla/venv/lib/python3.8/site-packages/django/core/handlers/base.py", line 115, in _get_response [Thu Jan 13 11:48:09.243750 2022] [wsgi:error] [pid 699:tid 139676869314304] [remote x:35360] response = self.process_exception_by_middleware(e, request) [Thu Jan 13 11:48:09.243756 2022] [wsgi:error] [pid 699:tid 139676869314304] [remote x:35360] File "/var/lib/kolla/venv/lib/python3.8/site-packages/django/core/handlers/base.py", line 113, in _get_response [Thu Jan 13 11:48:09.243759 2022] [wsgi:error] [pid 699:tid 139676869314304] [remote x:35360] response = wrapped_callback(request, *callback_args, **callback_kwargs) [Thu Jan 13 11:48:09.243763 2022] [wsgi:error] [pid 699:tid 139676869314304] [remote x:35360] File "/var/lib/kolla/venv/lib/python3.8/site-packages/django/views/generic/base.py", line 71, in view [Thu Jan 13 11:48:09.243767 2022] [wsgi:error] [pid 699:tid 139676869314304] [remote x:35360] return self.dispatch(request, *args, **kwargs) [Thu Jan 13 11:48:09.243770 2022] [wsgi:error] [pid 699:tid 139676869314304] [remote x:35360] File "/var/lib/kolla/venv/lib/python3.8/site-packages/django/views/generic/base.py", line 97, in dispatch [Thu Jan 13 11:48:09.243772 2022] [wsgi:error] [pid 699:tid 139676869314304] [remote x:35360] return handler(request, *args, **kwargs) [Thu Jan 13 11:48:09.243774 2022] [wsgi:error] [pid 699:tid 139676869314304] [remote x:35360] File "/var/lib/kolla/venv/lib/python3.8/site-packages/django/views/generic/edit.py", line 133, in get [Thu Jan 13 11:48:09.243792 2022] [wsgi:error] [pid 699:tid 139676869314304] [remote x:35360] return self.render_to_response(self.get_context_data()) [Thu Jan 13 11:48:09.243794 2022] [wsgi:error] [pid 699:tid 139676869314304] [remote x:35360] File "/var/lib/kolla/venv/lib/python3.8/site-packages/django/views/generic/edit.py", line 66, in get_context_data [Thu Jan 13 11:48:09.243800 2022] [wsgi:error] [pid 699:tid 139676869314304] [remote x:35360] kwargs['form'] = self.get_form() [Thu Jan 13 11:48:09.243803 2022] [wsgi:error] [pid 699:tid 139676869314304] [remote x:35360] File "/var/lib/kolla/venv/lib/python3.8/site-packages/django/views/generic/edit.py", line 33, in get_form [Thu Jan 13 11:48:09.243805 2022] [wsgi:error] [pid 699:tid 139676869314304] [remote x:35360] return form_class(**self.get_form_kwargs()) [Thu Jan 13 11:48:09.243807 2022] [wsgi:error] [pid 699:tid 139676869314304] [remote x:35360] File "/var/lib/kolla/venv/lib/python3.8/site-packages/openstack_auth/forms.py", line 213, in __init__ [Thu Jan 13 11:48:09.243809 2022] [wsgi:error] [pid 699:tid 139676869314304] [remote x:35360] self.fields['region'].initial = self.request.COOKIES.get( [Thu Jan 13 11:48:09.243811 2022] [wsgi:error] [pid 699:tid 139676869314304] [remote x:35360] AttributeError: 'Password' object has no attribute 'request' To manage notifications about this bug go to: https://bugs.launchpad.net/horizon/+bug/1957926/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

