[ 
https://issues.apache.org/jira/browse/AIRAVATA-3361?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eroma closed AIRAVATA-3361.
---------------------------

>  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}
> Also I'll note that it seems many if not most of these errors are actually 
> coming from search engine bots.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to