apache / apache/infrastructure-oauth

Conversion to a dict loses repeated keys in query string

Open Beginner friendly
#9 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
13
Forks
27
PR merge metrics
No merged PRs in 30d

Description

https://github.com/apache/infrastructure-oauth/blob/21d687c822ca84bc6aa8872c09aa99d5c9da2bde/app/endpoints/oauth.py#L71

If a query string contains repeated parameter keys, only one will be kept because of the conversion to a dict.

Whilst having repeated keys is unusual, it is allowed by the syntax.
Note that `parse_qsl` returns a list (rather than a dict) in order to allow for this.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at app/endpoints/oauth.py around line 71 and inspect how parse_qsl output is converted before the OAuth request is handled. Verify the behavior with a query string containing repeated parameter keys; done means all occurrences are preserved rather than one being discarded.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
authentication, backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.