diff options
author | James Moger <james.moger@gitblit.com> | 2013-09-23 10:02:07 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2013-09-23 10:02:07 -0400 |
commit | 8b6653a82eceb8621c78b716911540564dadd4b7 (patch) | |
tree | de35bf697b0587c88f06ef74bb514de6e56e7fbe /src/main/java | |
parent | b932aab97767f8bec43908497646054c81bf9c86 (diff) | |
download | gitblit-8b6653a82eceb8621c78b716911540564dadd4b7.tar.gz gitblit-8b6653a82eceb8621c78b716911540564dadd4b7.zip |
Return cloned usermodel on cookie authentication
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/com/gitblit/ConfigUserService.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/com/gitblit/ConfigUserService.java b/src/main/java/com/gitblit/ConfigUserService.java index 8a6c92f9..0d828aec 100644 --- a/src/main/java/com/gitblit/ConfigUserService.java +++ b/src/main/java/com/gitblit/ConfigUserService.java @@ -208,6 +208,12 @@ public class ConfigUserService implements IUserService { if (cookies.containsKey(hash)) {
model = cookies.get(hash);
}
+
+ if (model != null) {
+ // clone the model, otherwise all changes to this object are
+ // live and unpersisted
+ model = DeepCopier.copy(model);
+ }
return model;
}
|