You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@airavata.apache.org by "Marcus Christie (Jira)" <ji...@apache.org> on 2020/08/06 13:42:00 UTC
[jira] [Updated] (AIRAVATA-3361) MultiValueDictKeyError at
/auth/handle_login "'username'"
[ https://issues.apache.org/jira/browse/AIRAVATA-3361?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marcus Christie updated AIRAVATA-3361:
--------------------------------------
Description:
This error occurs when a user loads the /auth/handle_login as a GET request. /auth/handle_login incorrectly assumes that it will only handle POST requests.
I think the solution is to just have {{GET /auth/handle_login}} redirect to {{GET /auth/login}}.
{code}
Traceback:
File "/var/www/portals/django-interactwel/venv/lib64/python3.6/site-packages/django/utils/datastructures.py" in __getitem__
83. list_ = super(MultiValueDict, self).__getitem__(key)
During handling of the above exception ('username'), another exception occurred:
File "/var/www/portals/django-interactwel/venv/lib64/python3.6/site-packages/django/core/handlers/exception.py" in inner
41. response = get_response(request)
File "/var/www/portals/django-interactwel/venv/lib64/python3.6/site-packages/django/core/handlers/base.py" in _get_response
187. response = self.process_exception_by_middleware(e, request)
File "/var/www/portals/django-interactwel/venv/lib64/python3.6/site-packages/django/core/handlers/base.py" in _get_response
185. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/var/www/portals/django-interactwel/venv/lib64/python3.6/site-packages/django/views/decorators/debug.py" in sensitive_variables_wrapper
36. return func(*func_args, **func_kwargs)
File "/var/www/portals/django-interactwel/airavata-django-portal/django_airavata/apps/auth/views.py" in handle_login
81. username = request.POST['username']
File "/var/www/portals/django-interactwel/venv/lib64/python3.6/site-packages/django/utils/datastructures.py" in __getitem__
85. raise MultiValueDictKeyError(repr(key))
Exception Type: MultiValueDictKeyError at /auth/handle_login
Exception Value: "'username'"
{code}
was:
This error occurs when a user loads the /auth/handle_login as a GET request. /auth/handle_login incorrectly assumes that it will only handle POST requests.
I think the solution is to just have `GET /auth/handle_login` redirect to `GET /auth/login`.
```
Traceback:
File "/var/www/portals/django-interactwel/venv/lib64/python3.6/site-packages/django/utils/datastructures.py" in __getitem__
83. list_ = super(MultiValueDict, self).__getitem__(key)
During handling of the above exception ('username'), another exception occurred:
File "/var/www/portals/django-interactwel/venv/lib64/python3.6/site-packages/django/core/handlers/exception.py" in inner
41. response = get_response(request)
File "/var/www/portals/django-interactwel/venv/lib64/python3.6/site-packages/django/core/handlers/base.py" in _get_response
187. response = self.process_exception_by_middleware(e, request)
File "/var/www/portals/django-interactwel/venv/lib64/python3.6/site-packages/django/core/handlers/base.py" in _get_response
185. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/var/www/portals/django-interactwel/venv/lib64/python3.6/site-packages/django/views/decorators/debug.py" in sensitive_variables_wrapper
36. return func(*func_args, **func_kwargs)
File "/var/www/portals/django-interactwel/airavata-django-portal/django_airavata/apps/auth/views.py" in handle_login
81. username = request.POST['username']
File "/var/www/portals/django-interactwel/venv/lib64/python3.6/site-packages/django/utils/datastructures.py" in __getitem__
85. raise MultiValueDictKeyError(repr(key))
Exception Type: MultiValueDictKeyError at /auth/handle_login
Exception Value: "'username'"
```
> MultiValueDictKeyError at /auth/handle_login "'username'"
> ----------------------------------------------------------
>
> Key: AIRAVATA-3361
> URL: https://issues.apache.org/jira/browse/AIRAVATA-3361
> Project: Airavata
> Issue Type: Bug
> Components: Django Portal
> Reporter: Marcus Christie
> Assignee: Marcus Christie
> Priority: Major
>
> This error occurs when a user loads the /auth/handle_login as a GET request. /auth/handle_login incorrectly assumes that it will only handle POST requests.
> I think the solution is to just have {{GET /auth/handle_login}} redirect to {{GET /auth/login}}.
> {code}
> Traceback:
> File "/var/www/portals/django-interactwel/venv/lib64/python3.6/site-packages/django/utils/datastructures.py" in __getitem__
> 83. list_ = super(MultiValueDict, self).__getitem__(key)
>
>
> During handling of the above exception ('username'), another exception occurred:
>
>
> File "/var/www/portals/django-interactwel/venv/lib64/python3.6/site-packages/django/core/handlers/exception.py" in inner
> 41. response = get_response(request)
> File "/var/www/portals/django-interactwel/venv/lib64/python3.6/site-packages/django/core/handlers/base.py" in _get_response
> 187. response = self.process_exception_by_middleware(e, request)
> File "/var/www/portals/django-interactwel/venv/lib64/python3.6/site-packages/django/core/handlers/base.py" in _get_response
> 185. response = wrapped_callback(request, *callback_args, **callback_kwargs)
> File "/var/www/portals/django-interactwel/venv/lib64/python3.6/site-packages/django/views/decorators/debug.py" in sensitive_variables_wrapper
> 36. return func(*func_args, **func_kwargs)
> File "/var/www/portals/django-interactwel/airavata-django-portal/django_airavata/apps/auth/views.py" in handle_login
> 81. username = request.POST['username']
> File "/var/www/portals/django-interactwel/venv/lib64/python3.6/site-packages/django/utils/datastructures.py" in __getitem__
> 85. raise MultiValueDictKeyError(repr(key))
> Exception Type: MultiValueDictKeyError at /auth/handle_login
> Exception Value: "'username'"
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)