]
David Lloyd reassigned ELY-612:
-------------------------------
Assignee: David Lloyd (was: Darran Lofthouse)
Missing or unnecessary null check in AbstractDigestMechanism
------------------------------------------------------------
Key: ELY-612
URL:
https://issues.jboss.org/browse/ELY-612
Project: WildFly Elytron
Issue Type: Bug
Affects Versions: 1.1.0.Beta7
Reporter: Ondrej Lukas
Assignee: David Lloyd
Labels: static_analysis
Fix For: 1.1.0.Beta8
There is missing or unnecessary null check in {{getSaltedPasswordFromTwoWay}} method of
org.wildfly.security.sasl.digest.AbstractDigestMechanism. {{char[] passwordChars}} is
assigned on line 650 [1].
* In case when null can be assigned to {{passwordChars}} then there is missing null check
before calling {{userRealmPasswordDigest(messageDigest, username, realm, passwordChars);}}
on line 658 which can result to NPE.
* In case when null cannot be assigned to {{passwordChars}} then there is unnecessary
null check on line 659.
[1]
https://github.com/wildfly-security/wildfly-elytron/blob/e01a09572b02f33d...