]> source.dussan.org Git - gitblit.git/commitdiff
Fixed LdapUserService if account has null email address (issue 110)
authorJames Moger <james.moger@gitblit.com>
Tue, 17 Jul 2012 11:44:41 +0000 (07:44 -0400)
committerJames Moger <james.moger@gitblit.com>
Tue, 17 Jul 2012 11:44:41 +0000 (07:44 -0400)
docs/04_releases.mkd
src/com/gitblit/LdapUserService.java

index 80fc0290748dc343326c40af2a168bb44b2e4914..1c74c0cd01b42f98a842a85b0209a64f325ee444 100644 (file)
@@ -11,6 +11,16 @@ If you are updating from an 0.9.x release AND you have indexed branches with the
 \r
 #### fixes\r
 \r
+- Fixed null pointer in LdapUserSerivce if account has a null email address (issue 110)\r
+\r
+#### changes\r
+\r
+- Updated Polish translation\r
+\r
+**1.0.0** *released 2012-07-14*\r
+\r
+#### fixes\r
+\r
 - Fixed bug in Lucene search where old/stale blobs were never properly deleted during incremental updates.  This resulted in duplicate blob entries in the index.\r
 - Fixed intermittent bug in identifying line numbers in Lucene search (issue 105)\r
 - Adjust repository identification algorithm to handle the scenario where a repository name collides with a group/folder name (e.g. foo.git and foo/bar.git) (issue 104)\r
index bba943d99aebd2f02f6af917055df05092b7d8d1..61de01d989feaaf174fea608a3be82ced6d0de11 100644 (file)
@@ -220,7 +220,10 @@ public class LdapUserService extends GitblitUserService {
 \r
                                user.displayName = displayName;\r
                        } else {\r
-                               user.displayName = userEntry.getAttribute(displayName).getValue();\r
+                               Attribute attribute = userEntry.getAttribute(displayName);\r
+                               if (attribute != null && attribute.hasValue()) {\r
+                                       user.displayName = attribute.getValue();\r
+                               }\r
                        }\r
                }\r
                \r
@@ -233,7 +236,10 @@ public class LdapUserService extends GitblitUserService {
 \r
                                user.emailAddress = email;\r
                        } else {\r
-                               user.emailAddress = userEntry.getAttribute(email).getValue();\r
+                               Attribute attribute = userEntry.getAttribute(email);\r
+                               if (attribute != null && attribute.hasValue()) {\r
+                                       user.emailAddress = attribute.getValue();\r
+                               }\r
                        }\r
                }\r
        }\r