This is an automated email from the ASF dual-hosted git repository.
lprimak pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/shiro.git
The following commit(s) were added to refs/heads/main by this push:
new 82a97ab86 bugfix(debug): SimpleCredentialsMatcher debug logs cause an
NPE if turned on
82a97ab86 is described below
commit 82a97ab86d791e645b04993daa69b8144dace0b6
Author: lprimak <[email protected]>
AuthorDate: Sun Jan 18 16:01:24 2026 -0600
bugfix(debug): SimpleCredentialsMatcher debug logs cause an NPE if turned on
---
.../org/apache/shiro/authc/credential/SimpleCredentialsMatcher.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/core/src/main/java/org/apache/shiro/authc/credential/SimpleCredentialsMatcher.java
b/core/src/main/java/org/apache/shiro/authc/credential/SimpleCredentialsMatcher.java
index 0a3264b58..a0f471326 100644
---
a/core/src/main/java/org/apache/shiro/authc/credential/SimpleCredentialsMatcher.java
+++
b/core/src/main/java/org/apache/shiro/authc/credential/SimpleCredentialsMatcher.java
@@ -99,7 +99,7 @@ public class SimpleCredentialsMatcher extends CodecSupport
implements Credential
* @return {@code true} if the {@code tokenCredentials} are equal to the
{@code accountCredentials}.
*/
protected boolean equals(Object tokenCredentials, Object
accountCredentials) {
- if (LOGGER.isDebugEnabled()) {
+ if (LOGGER.isDebugEnabled() && tokenCredentials != null) {
LOGGER.debug("Performing credentials equality check for
tokenCredentials of type ["
+ tokenCredentials.getClass().getName() + " and
accountCredentials of type ["
+ accountCredentials.getClass().getName() + "]");