redis-version is 5.0.11
127.0.0.1:6379> auth '3er4#ER$`~!@#$%^&*()-_=+\'
Invalid argument(s)
127.0.0.1:6379> auth 3er4#ER$`~!@#$%^&*()-_=+\
OK 127.0.0.1:6379>
i guess is casused by redis-5.0.11/deps/hiredis/sds.c codes in sdssplitargs function } else if (insq) { if (p == '\' && (p+1) == '\'') { p++; current = sdscatlen(current,"'",1); }
Comment From: huangzhw
I think it's a bug. In single quotes the string is in raw mode. If we need a ', we should escape it use \. So I think \ is also a special character, it should be escaped too.
Comment From: yossigo
As indicated by @huangzhw, properly fixing this will require properly handling \ as a special character which is a breaking change. As it's not critical (using double quotes is an easy workaround), this should be postponed for version 7 which will be a good opportunity to introduce the breaking change.
Comment From: zuiderkwast
Shall we make the breaking change and fix single-quoted strings for 7.0? I think #8673 is the right solution.
Comment From: yossigo
@zuiderkwast I agree, it's a good opportunity to do that.