dlenski / gp-saml-gui

Interactively authenticate to GlobalProtect VPNs that require SAML
GNU General Public License v3.0
293 stars 66 forks source link

fix exception when checking about:blank response #97

Closed mildsunrise closed 4 months ago

mildsunrise commented 4 months ago

at some point, auth loads about:blank and (since there's no response) an exception occurs:

Traceback (most recent call last):
  File "gp_saml_gui.py", line 127, in on_load_changed
    ct = h.get_content_type()
         ^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get_content_type'

the current code doesn't make much sense -- if an HTTP response is not present, it sets 'h' to None... but then proceeds to do stuff with 'h' assuming it has some value.