summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/GitBlit.java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2013-06-17 15:59:47 -0400
committerJames Moger <james.moger@gitblit.com>2013-06-17 15:59:47 -0400
commit06b691211585fbe4049099b15fffb4cdc42cb728 (patch)
treeba69cb07a0fba5118ee38915f13a509923dc8d9a /src/main/java/com/gitblit/GitBlit.java
parent2f64a2810e14fb990fb7333d257864e67d49acd8 (diff)
downloadgitblit-06b691211585fbe4049099b15fffb4cdc42cb728.tar.gz
gitblit-06b691211585fbe4049099b15fffb4cdc42cb728.zip
Do not set cookies for sessions authenticated via certificate or container
Diffstat (limited to 'src/main/java/com/gitblit/GitBlit.java')
-rw-r--r--src/main/java/com/gitblit/GitBlit.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/com/gitblit/GitBlit.java b/src/main/java/com/gitblit/GitBlit.java
index ef739780..ecd4662c 100644
--- a/src/main/java/com/gitblit/GitBlit.java
+++ b/src/main/java/com/gitblit/GitBlit.java
@@ -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