diff --git a/rauth/utils.py b/rauth/utils.py index b0b420a..0746b2d 100644 --- a/rauth/utils.py +++ b/rauth/utils.py @@ -23,7 +23,9 @@ def absolute_url(url): def parse_utf8_qsl(s): d = dict(parse_qsl(s)) - for k, v in d.items(): # pragma: no cover + copy_d = dict(d); + + for k, v in copy_d.items(): # pragma: no cover if not isinstance(k, bytes) and not isinstance(v, bytes): # skip this iteration if we have no keys or values to update continue @@ -36,6 +38,7 @@ def parse_utf8_qsl(s): return d + def get_sorted_params(params): def sorting_gen(): for k in sorted(params.keys()):