6 Commits a5a43c375a ... f19f3c80ff

Autore SHA1 Messaggio Data
  tinyrabbit a5a43c375a Merge branch 'fix-url-decoding' of zertbert/gemini-antenna into master 5 mesi fa
  zertbert a09e3dde29 Clean up direct-ingestion.py 7 mesi fa
  zertbert 362ac8ddd6 Undo changes to /submit 7 mesi fa
  zertbert 1396dc2872 Don't add duplicate rules 7 mesi fa
  zertbert a33c6d1baa Fix double-unquoting when adding a filter 7 mesi fa
  zertbert 5593cab991 Decode URLs for submit and removing filters 7 mesi fa
1 ha cambiato i file con 2 aggiunte e 3 eliminazioni
  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":