From ae2bf3c357486ff49c4742e3e92ed0100a47c3bc Mon Sep 17 00:00:00 2001 From: almahmoud Date: Mon, 13 Jul 2020 17:51:27 -0400 Subject: [PATCH 1/2] Change cookie names to work with PR #9921 --- lib/galaxy/authnz/custos_authnz.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/authnz/custos_authnz.py b/lib/galaxy/authnz/custos_authnz.py index 165f6a5615a..bcd982b2abc 100644 --- a/lib/galaxy/authnz/custos_authnz.py +++ b/lib/galaxy/authnz/custos_authnz.py @@ -16,8 +16,8 @@ from galaxy.model import CustosAuthnzToken, User from ..authnz import IdentityProvider log = logging.getLogger(__name__) -STATE_COOKIE_NAME = 'custos-state' -NONCE_COOKIE_NAME = 'custos-nonce' +STATE_COOKIE_NAME = 'galaxy-oidc-state' +NONCE_COOKIE_NAME = 'galaxy-oidc-nonce' class CustosAuthnz(IdentityProvider): From 3e6efc70fd5fbb74eb1c8336fae3a6f699e637d7 Mon Sep 17 00:00:00 2001 From: almahmoud Date: Mon, 13 Jul 2020 17:55:21 -0400 Subject: [PATCH 2/2] Replace e.message with str(e) for Python 3 compatibility --- lib/galaxy/authnz/managers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/authnz/managers.py b/lib/galaxy/authnz/managers.py index 1876bdb82bd..38f9ceaf4a3 100644 --- a/lib/galaxy/authnz/managers.py +++ b/lib/galaxy/authnz/managers.py @@ -260,7 +260,7 @@ class AuthnzManager(object): return True, message, backend.callback(state_token, authz_code, trans, login_redirect_url) except Exception as e: msg = 'The following error occurred when handling callback from `{}` identity provider: ' \ - '{}'.format(provider, e.message) + '{}'.format(provider, str(e)) log.exception(msg) return False, msg, (None, None) @@ -289,7 +289,7 @@ class AuthnzManager(object): return True, message, backend.logout(trans, post_logout_redirect_url) except Exception as e: msg = 'The following error occurred when logging out from `{}` identity provider: ' \ - '{}'.format(provider, e.message) + '{}'.format(provider, str(e)) log.exception(msg) return False, msg, None