18
0

fix too-hurried ambiguity warnings, fix b64 encoding for SAML REDIRECT too

This commit is contained in:
Daniel Lenski
2020-03-22 22:46:53 -07:00
parent 2cf05074cc
commit 6bbbe47904
2 changed files with 6 additions and 8 deletions

View File

@@ -114,10 +114,10 @@ Extracted connection cookie from <jnlp>. Use this to connect:
elif xml is not None and xml.tag == 'prelogin-response' and None not in (xml.find('saml-auth-method'), xml.find('saml-request')):
import webbrowser
sam = xml.find('saml-auth-method').text
sr = xml.find('saml-request').text
sr = a2b_base64(xml.find('saml-request').text)
if sam == 'POST':
with NamedTemporaryFile(delete=False, suffix='.html') as tf:
tf.write(a2b_base64(sr))
tf.write(sr)
if args.browse:
print("Got SAML POST, browsing to %s" % tf.name)
webbrowser.open('file://' + tf.name)