소스 검색

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


불러오는 중...
취소
저장