Browse Source

URL exclusions: fix uppercase characters in patterns never matching

develop
Ben Kurtovic 3 years ago
parent
commit
b9074c9f9d
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      earwigbot/wiki/copyvios/exclusions.py

+ 1
- 0
earwigbot/wiki/copyvios/exclusions.py View File

@@ -187,6 +187,7 @@ class ExclusionsDB(object):
WHERE exclusion_sitename = ? OR exclusion_sitename = ?"""
with self._db_access_lock, sqlite.connect(self._dbfile) as conn:
for (excl,) in conn.execute(query, (sitename, "all")):
excl = excl.lower()
if excl.startswith("*."):
parsed = urlparse(url.lower())
matches = excl[2:] in parsed.netloc


Loading…
Cancel
Save