浏览代码

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


正在加载...
取消
保存