]> source.dussan.org Git - gitblit.git/commitdiff
Do not set cookies for sessions authenticated via certificate or container
authorJames Moger <james.moger@gitblit.com>
Mon, 17 Jun 2013 19:59:47 +0000 (15:59 -0400)
committerJames Moger <james.moger@gitblit.com>
Mon, 17 Jun 2013 19:59:47 +0000 (15:59 -0400)
src/main/java/com/gitblit/GitBlit.java

index ef739780f5c682fb20d8e0632b369856e28f7438..ecd4662c0727b5333ee7e051bec34e3cfef41d4d 100644 (file)
@@ -929,7 +929,10 @@ public class GitBlit implements ServletContextListener {
                if (userService == null) {
                        return;
                }
-               if (userService.supportsCookies()) {
+               GitBlitWebSession session = GitBlitWebSession.get();
+               boolean standardLogin = session.authenticationType.isStandard();
+
+               if (userService.supportsCookies() && standardLogin) {
                        Cookie userCookie;
                        if (user == null) {
                                // clear cookie for logout