You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The class DefaultJedisClientConfig overrides the getPassword method that returns a String.
Returning a string might be considered a potential security issue since an attacker might inspect the heap and find the value in plaintext.
Ideally we should just pass-through the value supplied by the provider here and not create a String based on the char[] array.
Expected behavior
Return a char[] instead of String
Actual behavior
A string is returned.
Steps to reproduce:
N/A
Redis / Jedis Configuration
N/A
Jedis version:
N/A
Redis version:
Java version:
N/A
The text was updated successfully, but these errors were encountered:
String getPassword() is still there to support legacy applications without breaking. We may remove it at some point in favor of getCredentialsProvider().
If possible, I would like to take ownership of this issue. In my opinion, I can replace String with char[] and modify the DefaultJedisClientConfig class and DefaultRedisCredentials methods. However, I have three questions:
Using char[] instead of String is for easier password clearing. When exactly should we clear the password? Or is it not necessary to clear it?
I couldn't find any unit tests for getPassword. Do I need to write a unit test for it to follow TDD development practices?
The class DefaultJedisClientConfig overrides the getPassword method that returns a String.
Returning a string might be considered a potential security issue since an attacker might inspect the heap and find the value in plaintext.
Ideally we should just pass-through the value supplied by the provider here and not create a String based on the char[] array.
Expected behavior
Return a char[] instead of String
Actual behavior
A string is returned.
Steps to reproduce:
N/A
Redis / Jedis Configuration
N/A
Jedis version:
N/A
Redis version:
Java version:
N/A
The text was updated successfully, but these errors were encountered: