Skip to content
Permalink
Browse files
[fixed JENKINS-42112] HTTP user session is reported as anonymous when…
… 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 5ae983fa1199573e53dacd665e5b610c718819ff
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/main/java/org/jvnet/hudson/plugins/monitoring/HudsonMonitoringFilter.java
@@ -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);
}
}

0 comments on commit 5ae983f

Please sign in to comment.