- Raise error when ARC signing if i= instance limit value of 50 is

exceeded
This commit is contained in:
Scott Kitterman
2018-10-30 08:55:32 -04:00
parent cd0ebc1ecb
commit 82d01d8a42
2 changed files with 5 additions and 0 deletions
+3
View File
@@ -899,6 +899,7 @@ class ARC(DomainSigner):
def sign(self, selector, domain, privkey, srv_id, include_headers=None,
timestamp=None, standardize=False):
INSTANCE_LIMIT = 50 # Maximum allowed i= value
# check if authres has been imported
try:
AuthenticationResultsHeader
@@ -961,6 +962,8 @@ class ARC(DomainSigner):
instance = 1
if len(arc_headers_w_instance) != 0:
instance = max_instance + 1
if instance > INSTANCE_LIMIT:
raise ParameterError("Maximum instance tag value exceeded")
if instance == 1 and chain_validation_status != CV_None:
raise ParameterError("No existing chain found on message, cv should be none")