mirror of
https://github.com/os-mnemo/pan-globalprotect-okta
synced 2026-07-31 07:44:38 +02:00
trim trailing whitespace
This commit is contained in:
+8
-8
@@ -2,22 +2,22 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
"""
|
"""
|
||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|
||||||
Copyright (C) 2018 Andris Raugulis (moo@arthepsy.eu)
|
Copyright (C) 2018 Andris Raugulis (moo@arthepsy.eu)
|
||||||
Copyright (C) 2018 Nick Lanham (nick@afternight.org)
|
Copyright (C) 2018 Nick Lanham (nick@afternight.org)
|
||||||
Copyright (C) 2019 Aaron Lindsay (aclindsa@gmail.com)
|
Copyright (C) 2019 Aaron Lindsay (aclindsa@gmail.com)
|
||||||
Copyright (C) 2019 Tino Lange (coldcoff@yahoo.com)
|
Copyright (C) 2019 Tino Lange (coldcoff@yahoo.com)
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
in the Software without restriction, including without limitation the rights
|
in the Software without restriction, including without limitation the rights
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
furnished to do so, subject to the following conditions:
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
The above copyright notice and this permission notice shall be included in
|
||||||
all copies or substantial portions of the Software.
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
@@ -226,7 +226,7 @@ def send_req(conf, s, name, url, data, **kwargs):
|
|||||||
purl = (purl[0], purl[1].split(':')[0])
|
purl = (purl[0], purl[1].split(':')[0])
|
||||||
pexp = list(urlparse(kwargs.get('expected_url')))
|
pexp = list(urlparse(kwargs.get('expected_url')))
|
||||||
pexp = (pexp[0], pexp[1].split(':')[0])
|
pexp = (pexp[0], pexp[1].split(':')[0])
|
||||||
if purl != pexp:
|
if purl != pexp:
|
||||||
err('{0}: unexpected url found {1} != {2}'.format(name, purl, pexp))
|
err('{0}: unexpected url found {1} != {2}'.format(name, purl, pexp))
|
||||||
do_json = True if kwargs.get('json') else False
|
do_json = True if kwargs.get('json') else False
|
||||||
headers = {}
|
headers = {}
|
||||||
@@ -571,7 +571,7 @@ def okta_saml_2(conf, s, gateway, saml_xml):
|
|||||||
expected_url=conf.get('okta_url'), verify=conf.get('okta_url_cert'))
|
expected_url=conf.get('okta_url'), verify=conf.get('okta_url_cert'))
|
||||||
xhtml = parse_html(c)
|
xhtml = parse_html(c)
|
||||||
url, data = parse_form(xhtml)
|
url, data = parse_form(xhtml)
|
||||||
|
|
||||||
log('okta redirect form request (2) [gateway]')
|
log('okta redirect form request (2) [gateway]')
|
||||||
verify = None
|
verify = None
|
||||||
if conf.get('openconnect_certs') and os.path.getsize(conf.get('openconnect_certs').name) > 0:
|
if conf.get('openconnect_certs') and os.path.getsize(conf.get('openconnect_certs').name) > 0:
|
||||||
@@ -593,7 +593,7 @@ def main():
|
|||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
conf = load_conf(sys.argv[1])
|
conf = load_conf(sys.argv[1])
|
||||||
|
|
||||||
s = requests.Session()
|
s = requests.Session()
|
||||||
|
|
||||||
if conf.get('client_cert'):
|
if conf.get('client_cert'):
|
||||||
@@ -643,7 +643,7 @@ def main():
|
|||||||
else:
|
else:
|
||||||
cookie_type = "portal:portal-userauthcookie"
|
cookie_type = "portal:portal-userauthcookie"
|
||||||
cookie = userauthcookie
|
cookie = userauthcookie
|
||||||
|
|
||||||
username = saml_username
|
username = saml_username
|
||||||
|
|
||||||
cmd = conf.get('openconnect_cmd', 'openconnect')
|
cmd = conf.get('openconnect_cmd', 'openconnect')
|
||||||
|
|||||||
Reference in New Issue
Block a user