diff options
author | Alexandre Flament <alex@al-f.net> | 2020-09-22 16:31:17 +0200 |
---|---|---|
committer | Alexandre Flament <alex@al-f.net> | 2020-09-22 18:59:51 +0200 |
commit | eecfff268913045f957c0fceb2a1caf56f236a1f (patch) | |
tree | 692aa8187e2bae9e61280bb5465faaa31db64fe3 /searx/webadapter.py | |
parent | 2929495112e9869af24986b27066163572bc558a (diff) | |
download | searxng-eecfff268913045f957c0fceb2a1caf56f236a1f.tar.gz searxng-eecfff268913045f957c0fceb2a1caf56f236a1f.zip |
[mod] check time_range parameter in searx/webadapter.py
Diffstat (limited to 'searx/webadapter.py')
-rw-r--r-- | searx/webadapter.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/searx/webadapter.py b/searx/webadapter.py index 97379b17e..0567c8d34 100644 --- a/searx/webadapter.py +++ b/searx/webadapter.py @@ -64,7 +64,8 @@ def get_search_query_from_webapp(preferences, form): query_time_range = form.get('time_range') # check time_range - if query_time_range not in ('None', None, '', 'day', 'week', 'month', 'year'): + query_time_range = None if query_time_range in ('', 'None') else query_time_range + if query_time_range not in (None, 'day', 'week', 'month', 'year'): raise SearxParameterException('time_range', query_time_range) # query_engines |