Skip to content

Commit 812e1e7

Browse files
author
Roland Hedberg
committed
So not completely clear on what the standard says. Had to add this to make it work with Shibboleth IdP.
1 parent 06bb368 commit 812e1e7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/saml2/entity.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import base64
2+
from binascii import hexlify
23
import logging
34
from hashlib import sha1
45
from saml2.metadata import ENDPOINTS
@@ -857,7 +858,10 @@ def artifact2destination(self, artifact, descriptor):
857858

858859
assert _art[:2] == ARTIFACT_TYPECODE
859860

860-
endpoint_index = str(int(_art[2:4]))
861+
try:
862+
endpoint_index = str(int(_art[2:4]))
863+
except ValueError:
864+
endpoint_index = str(int(hexlify(_art[2:4])))
861865
entity = self.sourceid[_art[4:24]]
862866

863867
destination = None

0 commit comments

Comments
 (0)