1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-22 12:10:11 +01:00

Merge pull request #1974 from fehho/query-string-deserial

[fix] Deserialize preferences which are explicitly blank strings
This commit is contained in:
Alexandre Flament 2022-12-16 18:56:30 +01:00 committed by GitHub
commit 2a51c85672
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -441,7 +441,7 @@ class Preferences:
"""parse (base64) preferences from request (``flask.request.form['preferences']``)"""
bin_data = decompress(urlsafe_b64decode(input_data))
dict_data = {}
for x, y in parse_qs(bin_data.decode('ascii')).items():
for x, y in parse_qs(bin_data.decode('ascii'), keep_blank_values=True).items():
dict_data[x] = y[0]
self.parse_dict(dict_data)