瀏覽代碼

URL exclusions: fix uppercase characters in patterns never matching

legacy-python2
Ben Kurtovic 4 年之前
父節點
當前提交
b9074c9f9d
共有 1 個檔案被更改,包括 1 行新增0 行删除
  1. +1
    -0
      earwigbot/wiki/copyvios/exclusions.py

+ 1
- 0
earwigbot/wiki/copyvios/exclusions.py 查看文件

@@ -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…
取消
儲存