File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
src/main/java/com/gitblit/authority Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 11
11
html: ~
12
12
text: ~
13
13
security: ~
14
- fixes: ~
14
+ fixes:
15
+ - Fix crash in Gitblit Authority when users were deleted from Gitblit but still had entries (certificates) in the Authority.
15
16
changes:
16
17
- Minimum Java required increased to Java 8
17
18
additions: ~
Original file line number Diff line number Diff line change @@ -299,7 +299,11 @@ private void load(File folder) {
299
299
List <UserCertificateModel > list = UserCertificateConfig .KEY .parse (config ).list ;
300
300
for (UserCertificateModel ucm : list ) {
301
301
ucm .user = userService .getUserModel (ucm .user .username );
302
- map .put (ucm .user .username , ucm );
302
+ // Users may have been deleted, but are still present in authority.conf.
303
+ // TODO: Currently this only keeps the app from crashing. It should provide means to show obsolete user entries and delete them.
304
+ if (ucm .user != null ) {
305
+ map .put (ucm .user .username , ucm );
306
+ }
303
307
}
304
308
} catch (IOException e ) {
305
309
e .printStackTrace ();
You can’t perform that action at this time.
0 commit comments