diff --git a/redis/src/main/scala/com/avsystem/commons/redis/commands/connection.scala b/redis/src/main/scala/com/avsystem/commons/redis/commands/connection.scala index 6999e3bbc..dd15f42f6 100644 --- a/redis/src/main/scala/com/avsystem/commons/redis/commands/connection.scala +++ b/redis/src/main/scala/com/avsystem/commons/redis/commands/connection.scala @@ -50,6 +50,10 @@ trait ConnectionConnectionApi extends NodeConnectionApi { private final class Auth(username: Opt[String], password: String) extends RedisUnitCommand with ConnectionCommand { val encoded: Encoded = encoder("AUTH").optAdd(username).add(password).result + + // hide password value in error messages + override def toString: String = + s""""AUTH" ${username.mapOr("", u => s""""$u" """)}""""" } private object Quit extends RedisUnitCommand with ConnectionCommand { @@ -60,4 +64,3 @@ trait ConnectionConnectionApi extends NodeConnectionApi { val encoded: Encoded = encoder("SELECT").add(index).result } } -