Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Widget API raises an error if query parameters are removed #1014

Open
michaelwood opened this issue Oct 20, 2023 · 0 comments
Open

Widget API raises an error if query parameters are removed #1014

michaelwood opened this issue Oct 20, 2023 · 0 comments

Comments

@michaelwood
Copy link
Member

Widget API raises an error if query parameters are removed on /search.widgets_api
'start'

If someone manipulates the URL for the widgets

KeyError: 'start'
  File "django/utils/datastructures.py", line 76, in __getitem__
    list_ = super().__getitem__(key)

MultiValueDictKeyError: 'start'
(2 additional frame(s) were not displayed)
...
  File "grantnav/frontend/views.py", line 602, in search_wrapper_xframe_exempt
    response = search(request, template_name)
  File "grantnav/frontend/views.py", line 732, in search
    return widget_search(request, json_query)
  File "grantnav/frontend/views.py", line 608, in widget_search
    start = int(request.GET['start'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants