Skip to content

Commit c1d3d3a

Browse files
committed
Use normalized_url to prevent double counting query strings
Signed-off-by: Brian Donohue <brian@bthdonohue.com>
1 parent b94f69b commit c1d3d3a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

oauth2/__init__.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -551,9 +551,11 @@ def from_request(cls, http_method, http_url, headers=None, parameters=None,
551551
url_params = cls._split_url_string(param_str)
552552
parameters.update(url_params)
553553

554-
if parameters:
555-
return cls(http_method, http_url, parameters)
556-
554+
if parameters or param_str:
555+
req = cls(http_method, http_url, parameters)
556+
req.url = req.normalized_url
557+
return req
558+
557559
return None
558560

559561
@classmethod

0 commit comments

Comments
 (0)