Skip to content

Commit dae05b5

Browse files
author
Paul Hethmon
committed
Issue #3
fix npe in JAAS submodule when no credentials provided
1 parent 669cb19 commit dae05b5

File tree

6 files changed

+6
-2
lines changed

6 files changed

+6
-2
lines changed
58 KB
Binary file not shown.
-58 KB
Binary file not shown.
60.1 KB
Binary file not shown.
58 KB
Binary file not shown.

mcb-project/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>edu.internet2.middleware.assurance.mcb</groupId>
66
<artifactId>multi-context-broker</artifactId>
7-
<version>1.1.3</version>
7+
<version>1.1.4</version>
88
<packaging>jar</packaging>
99

1010
<name>multi-context-broker</name>

mcb-project/src/main/java/edu/internet2/middleware/assurance/mcb/authn/provider/JAASLoginSubmodule.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,11 @@ public void handle(final Callback[] callbacks) throws UnsupportedCallbackExcepti
310310
ncb.setName(uname);
311311
} else if (cb instanceof PasswordCallback) {
312312
PasswordCallback pcb = (PasswordCallback) cb;
313-
pcb.setPassword(pass.toCharArray());
313+
if (pass != null) {
314+
pcb.setPassword(pass.toCharArray());
315+
} else {
316+
pcb.setPassword(null);
317+
}
314318
}
315319
}
316320
}

0 commit comments

Comments
 (0)