]> source.dussan.org Git - gitblit.git/commitdiff
Fix potential NPE in cookie retrieval
authorJames Moger <james.moger@gitblit.com>
Mon, 23 Sep 2013 14:53:27 +0000 (10:53 -0400)
committerJames Moger <james.moger@gitblit.com>
Mon, 23 Sep 2013 14:53:27 +0000 (10:53 -0400)
src/main/java/com/gitblit/ConfigUserService.java

index 0d828aecb836478e9c0bc88507c679a9d3a25b66..2475b9abe4dac6993e076788102970ed035a67cd 100644 (file)
@@ -188,6 +188,9 @@ public class ConfigUserService implements IUserService {
                }\r
                read();\r
                UserModel storedModel = users.get(model.username.toLowerCase());\r
+               if (storedModel == null) {\r
+                       return null;\r
+               }\r
                return storedModel.cookie;\r
        }\r
 \r