You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2019/05/04 12:48:32 UTC

[tomcat] branch master updated: Avoid possible NPE reported by Coverity scan

This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
     new 1488552  Avoid possible NPE reported by Coverity scan
1488552 is described below

commit 1488552190f3272ab1c57baa4ed34e3e1f84e6c9
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Sat May 4 13:47:12 2019 +0100

    Avoid possible NPE reported by Coverity scan
---
 java/org/apache/catalina/realm/JAASCallbackHandler.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/realm/JAASCallbackHandler.java b/java/org/apache/catalina/realm/JAASCallbackHandler.java
index 3b439ce..407414e 100644
--- a/java/org/apache/catalina/realm/JAASCallbackHandler.java
+++ b/java/org/apache/catalina/realm/JAASCallbackHandler.java
@@ -90,7 +90,7 @@ public class JAASCallbackHandler implements CallbackHandler {
         this.realm = realm;
         this.username = username;
 
-        if (realm.hasMessageDigest()) {
+        if (password != null && realm.hasMessageDigest()) {
             this.password = realm.getCredentialHandler().mutate(password);
         }
         else {


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org