Skip to content

Commit d62dcd5

Browse files
committed
refactoring xmlstr argument to enc_request (to remove defense against outside code reviewers ;-)
1 parent 816dcc7 commit d62dcd5

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/saml2/entity.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -588,10 +588,10 @@ def srv2typ(service):
588588
else:
589589
return typ
590590

591-
def _parse_request(self, xmlstr, request_cls, service, binding):
591+
def _parse_request(self, enc_request, request_cls, service, binding):
592592
"""Parse a Request
593593
594-
:param xmlstr: The request in its transport format
594+
:param enc_request: The request in its transport format
595595
:param request_cls: The type of requests I expect
596596
:param service:
597597
:param binding: Which binding that was used to transport the message
@@ -625,16 +625,15 @@ def _parse_request(self, xmlstr, request_cls, service, binding):
625625
self.config.attribute_converters,
626626
timeslack=timeslack)
627627

628-
origdoc = xmlstr
629-
xmlstr = self.unravel(xmlstr, binding, request_cls.msgtype)
628+
xmlstr = self.unravel(enc_request, binding, request_cls.msgtype)
630629
must = self.config.getattr("want_authn_requests_signed", "idp")
631630
only_valid_cert = self.config.getattr(
632631
"want_authn_requests_only_with_valid_cert", "idp")
633632
if only_valid_cert is None:
634633
only_valid_cert = False
635634
if only_valid_cert:
636635
must = True
637-
_request = _request.loads(xmlstr, binding, origdoc=origdoc, must=must,
636+
_request = _request.loads(xmlstr, binding, origdoc=enc_request, must=must,
638637
only_valid_cert=only_valid_cert)
639638

640639
_log_debug("Loaded request")

0 commit comments

Comments
 (0)