You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 14, 2020. It is now read-only.
Should instead be if not self._request_xml.strip().startswith(b'<'):
At least on Python 3 -- not checked if this breaks Python 2.
I'm currently monkey-patching with the following code:
frombs4importBeautifulSoupfromsaml2idp.baseimportCaseInsensitiveDictimportsaml2idp.basedef_parse_request(self):
""" Parses various parameters from _request_xml into _request_params """# Minimal test to verify that it's not binarily encoded still:ifnotself._request_xml.strip().startswith(b'<'):
raiseException(
'RequestXML is not valid XML; ''it may need to be decoded or decompressed.'
)
soup=BeautifulSoup(self._request_xml, 'xml')
request=soup.findAll()[0]
# BeautifulSoup 4 uses case-dependent matching where v3 forced# all names to lowercase, so we emulate that behaviour.attrs=CaseInsensitiveDict(request.attrs)
self._request_params=dict(
ACS_URL=attrs['assertionconsumerserviceurl'],
REQUEST_ID=attrs['id'],
DESTINATION=attrs.get('destination', ''),
PROVIDER_NAME=attrs.get('providername', ''),
)
saml2idp.base.Processor._parse_request=_parse_request
The text was updated successfully, but these errors were encountered:
syserr0r
added a commit
to syserr0r/dj-saml-idp
that referenced
this issue
Aug 6, 2020
dj-saml-idp/saml2idp/base.py
Line 215 in 8ee1d65
Should instead be
if not self._request_xml.strip().startswith(b'<'):
At least on Python 3 -- not checked if this breaks Python 2.
I'm currently monkey-patching with the following code:
The text was updated successfully, but these errors were encountered: