Skip to content

Commit 73a3d93

Browse files
arthurdejongkislyuk
authored andcommitted
Allow URI attribute of Reference to be absent (#102)
The schema and standard allow for the absence of the URI attribute of the <ds:Reference> element. For example the signed XML files that oath-toolkit produces are missing this attribute.
1 parent 3dee7c4 commit 73a3d93

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

signxml/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def _c14n(self, nodes, algorithm, inclusive_ns_prefixes=None):
223223

224224
def _resolve_reference(self, doc_root, reference, uri_resolver=None):
225225
uri = reference.get("URI")
226-
if uri == "":
226+
if not uri:
227227
return doc_root
228228
elif uri.startswith("#xpointer("):
229229
raise InvalidInput("XPointer references are not supported")

0 commit comments

Comments
 (0)