6 Achegas a5a43c375a ... f19f3c80ff

Autor SHA1 Mensaxe Data
  tinyrabbit a5a43c375a Merge branch 'fix-url-decoding' of zertbert/gemini-antenna into master hai 5 meses
  zertbert a09e3dde29 Clean up direct-ingestion.py hai 7 meses
  zertbert 362ac8ddd6 Undo changes to /submit hai 7 meses
  zertbert 1396dc2872 Don't add duplicate rules hai 7 meses
  zertbert a33c6d1baa Fix double-unquoting when adding a filter hai 7 meses
  zertbert 5593cab991 Decode URLs for submit and removing filters hai 7 meses
Modificáronse 1 ficheiros con 2 adicións e 3 borrados
  1. 2 3
      customFilters.py

+ 2 - 3
customFilters.py

@@ -7,6 +7,7 @@ from os import getenv
 from os.path import exists
 import string
 import random
+import URLHelper
 import antennaDB
 import signoffs
 
@@ -41,14 +42,12 @@ else:
     rules = list(filter(("").__ne__, rules))
     rules.pop(0)
     affectedRule = getenv('QUERY_STRING')
-    affectedRule = unquote(affectedRule)
 
     if filterFilePathParts[-1] == "add":
         if not affectedRule:
             print("10 Rule to add:\r\n")
         else:
-            if affectedRule not in rules:
-                rules.insert(0, affectedRule)
+            rules.insert(0,unquote(affectedRule))
             print("30 gemini://"+getenv('SERVER_NAME')+getenv('SCRIPT_NAME')+"/"+filterFilePathParts[0]+"\r\n")
 
     elif filterFilePathParts[-1] == "remove":