Skip to content

Commit

Permalink
[fixed JENKINS-42112] HTTP user session is reported as anonymous when…
Browse files Browse the repository at this point in the history
… using anything but AbstractPasswordBasedSecurityRealm

[fixed JENKINS-42112] HTTP user session is reported as anonymous when
using anything but AbstractPasswordBasedSecurityRealm (like google login
plugin)
  • Loading branch information
evernat committed Feb 17, 2017
1 parent 1397ee1 commit 5ae983f
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -137,7 +137,8 @@ private void putUserInfoInSession(HttpServletRequest httpRequest) {
// login utilisateur, peut être null
// dans Jenkins, pas remoteUser = httpRequest.getRemoteUser();
final String remoteUser = Jenkins.getAuthentication().getName();
if (remoteUser != null) {
// !anonymous for https://issues.jenkins-ci.org/browse/JENKINS-42112
if (remoteUser != null && !"anonymous".equals(remoteUser)) {
session.setAttribute(NodesController.SESSION_REMOTE_USER, remoteUser);
}
}
Expand Down

0 comments on commit 5ae983f

Please sign in to comment.