From d20677bb640de726574ae7f3e8d86739a8702cb5 Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Thu, 29 Oct 2015 12:09:45 -0400 Subject: [PATCH] Fix Remote User failures due to apache null headers. --- lib/galaxy/web/framework/webapp.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/web/framework/webapp.py b/lib/galaxy/web/framework/webapp.py index 4d53c544415..b27127632f4 100644 --- a/lib/galaxy/web/framework/webapp.py +++ b/lib/galaxy/web/framework/webapp.py @@ -397,9 +397,10 @@ class GalaxyWebTransaction( base.DefaultWebTransaction, # No user, associate galaxy_session.user = self.get_or_create_remote_user( remote_user_email ) galaxy_session_requires_flush = True - elif ((galaxy_session.user.email != remote_user_email) and + elif (not remote_user_email.startswith('(null)') and # Apache does this, see remoteuser.py + (galaxy_session.user.email != remote_user_email) and ((not self.app.config.allow_user_impersonation) or - (remote_user_email not in self.app.config.admin_users_list))): + (remote_user_email not in self.app.config.admin_users_list))): # Session exists but is not associated with the correct # remote user, and the currently set remote_user is not a # potentially impersonating admin.