提交 e8db435e 编写于 作者: S Shengliang Guan

enh: adjust password len

上级 544a2534
......@@ -222,7 +222,7 @@ typedef struct {
typedef struct {
char user[TSDB_USER_LEN];
char pass[TSDB_PASSWORD_LEN];
char pass[TSDB_PASSWORD_LEN + 1];
char acct[TSDB_USER_LEN];
int64_t createdTime;
int64_t updateTime;
......
......@@ -230,7 +230,7 @@ static int32_t mndProcessConnectReq(SRpcMsg *pReq) {
mGError("user:%s, failed to login while acquire user since %s", pReq->info.conn.user, terrstr());
goto CONN_OVER;
}
if (0 != strncmp(connReq.passwd, pUser->pass, TSDB_PASSWORD_LEN - 1)) {
if (0 != strncmp(connReq.passwd, pUser->pass, TSDB_PASSWORD_LEN)) {
mGError("user:%s, failed to auth while acquire user, input:%s", pReq->info.conn.user, connReq.passwd);
code = TSDB_CODE_RPC_AUTH_FAILURE;
goto CONN_OVER;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册