mirror of
https://github.com/os-mnemo/pan-globalprotect-okta
synced 2026-07-31 07:44:38 +02:00
Bugfix: guard case when error msg is not returned
This commit is contained in:
+6
-1
@@ -248,7 +248,12 @@ def paloalto_prelogin(conf, s, gateway=None):
|
||||
saml_req = x.find('.//saml-request')
|
||||
if saml_req is None:
|
||||
msg = x.find('.//msg')
|
||||
msg = msg.text.strip() if msg is not None else 'Probably you need a certificate?'
|
||||
if msg is not None:
|
||||
msg = msg.text
|
||||
if msg is not None:
|
||||
msg = msg.strip()
|
||||
else:
|
||||
msg = 'Probably you need a certificate?'
|
||||
err('did not find saml request. {0}'.format(msg))
|
||||
if len(saml_req.text.strip()) == 0:
|
||||
err('empty saml request')
|
||||
|
||||
Reference in New Issue
Block a user