瀏覽代碼

[fix] do not save engine/plugin cookies as unknown settings options - fixes #1110

Adam Tauber 7 年之前
父節點
當前提交
2dc02f50c2
共有 1 個檔案被更改,包括 6 行新增1 行删除
  1. 6
    1
      searx/preferences.py

+ 6
- 1
searx/preferences.py 查看文件

@@ -304,7 +304,12 @@ class Preferences(object):
304 304
             elif user_setting_name == 'disabled_plugins':
305 305
                 self.plugins.parse_cookie((input_data.get('disabled_plugins', ''),
306 306
                                            input_data.get('enabled_plugins', '')))
307
-            else:
307
+            elif not any(user_setting_name.startswith(x) for x in [
308
+                    'enabled_',
309
+                    'disabled_',
310
+                    'engine_',
311
+                    'category_',
312
+                    'plugin_']):
308 313
                 self.unknown_params[user_setting_name] = user_setting
309 314
 
310 315
     def parse_form(self, input_data):