Permalink
Browse files

Fix is_trusted_issuer() for sites that don't declare support.

Previously the delegation check was throwing a ConnectionError because it
could not fetch the support document.
  • Loading branch information...
1 parent 47bbed5 commit 1d9401f70be913a2cd22a12491576bd89ce62400 @rfk rfk committed Jul 16, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 browserid/supportdoc.py
View
@@ -92,7 +92,10 @@ def is_trusted_issuer(self, hostname, issuer, trusted_secondaries=None,
num_delegations = 0
while num_delegations < max_delegations:
- supportdoc = self.get_support_document(hostname)
+ try:
+ supportdoc = self.get_support_document(hostname)
+ except (InvalidIssuerError, ConnectionError):
+ break
authority = supportdoc.get("authority")
if authority is None:
break

0 comments on commit 1d9401f

Please sign in to comment.