Fix and test case for case insensitive subdomain matching.

This commit is contained in:
Stuart D Gathman
2015-08-06 22:24:34 -04:00
parent b8722f4a66
commit 01541a3c36
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -161,7 +161,7 @@ def validate_signature_fields(sig):
# Nasty hack to support both str and bytes... check for both the
# character and integer values.
if b'i' in sig and (
not sig[b'i'].endswith(sig[b'd']) or
not sig[b'i'].lower().endswith(sig[b'd'].lower()) or
sig[b'i'][-len(sig[b'd'])-1] not in ('@', '.', 64, 46)):
raise ValidationError(
"i= domain is not a subdomain of d= (i=%s d=%s)" %