Skip to content

Commit 54c276e

Browse files
committed
Merge remote-tracking branch 'origin/2.10.x'
2 parents dea2004 + 0a4d2f3 commit 54c276e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

redis/src/main/scala/com/avsystem/commons/redis/commands/connection.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ trait ConnectionConnectionApi extends NodeConnectionApi {
5050

5151
private final class Auth(username: Opt[String], password: String) extends RedisUnitCommand with ConnectionCommand {
5252
val encoded: Encoded = encoder("AUTH").optAdd(username).add(password).result
53+
54+
// hide password value in error messages
55+
override def toString: String =
56+
s""""AUTH" ${username.mapOr("", u => s""""$u" """)}"<password>""""
5357
}
5458

5559
private object Quit extends RedisUnitCommand with ConnectionCommand {
@@ -60,4 +64,3 @@ trait ConnectionConnectionApi extends NodeConnectionApi {
6064
val encoded: Encoded = encoder("SELECT").add(index).result
6165
}
6266
}
63-

0 commit comments

Comments
 (0)