diff options
author | fehho <admin@jcf.one> | 2022-11-24 13:12:06 -0600 |
---|---|---|
committer | fehho <admin@jcf.one> | 2022-11-24 13:14:12 -0600 |
commit | 7cab51f98f43f2d476d62435bc762983000e9376 (patch) | |
tree | 7f3d87e81812597cc66f95bf64712715c1359ca2 /searx/preferences.py | |
parent | b5371b7a85b548b28853014963da83b57fba5dc7 (diff) | |
download | searxng-7cab51f98f43f2d476d62435bc762983000e9376.tar.gz searxng-7cab51f98f43f2d476d62435bc762983000e9376.zip |
Deserialize explicitly blank strings
Default behavior of urllib.parse_qs is to discard blank values, causing a preference of none to be deserialized as undefined, using the instance default rather than the selected preference.
Diffstat (limited to 'searx/preferences.py')
-rw-r--r-- | searx/preferences.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/searx/preferences.py b/searx/preferences.py index 8efa737fe..3d23c9331 100644 --- a/searx/preferences.py +++ b/searx/preferences.py @@ -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) |