Skip to content

Commit

Permalink
Merge pull request #1003 from dannon/remote_user_apache_fix
Browse files Browse the repository at this point in the history
[15.10] Fix Remote User failures due to apache null headers.
  • Loading branch information
natefoo committed Nov 3, 2015
2 parents 3b133d0 + d20677b commit 3b8edf6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/galaxy/web/framework/webapp.py
Expand Up @@ -397,9 +397,10 @@ def _ensure_valid_session( self, session_cookie, create=True):
# 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.
Expand Down

0 comments on commit 3b8edf6

Please sign in to comment.