addressing Chad's feedbakc

This commit is contained in:
Hossein Shafagh 2020-10-26 19:16:40 -07:00
parent 2430507e55
commit 3b258447db

View File

@ -583,7 +583,7 @@ def query_common_name(common_name, args):
# search based on owner and cn
result = (
Certificate.query.filter(Certificate.not_after >= current_time.format("YYYY-MM-DD"))
.filter(Certificate.cn.like(common_name))
.filter(Certificate.cn.ilike(common_name))
.filter(Certificate.owner == owner)
.filter(not_(Certificate.revoked))
.filter(not_(Certificate.replaced.any())) # ignore rotated certificates to avoid duplicates