enh: adjust password len
This commit is contained in:
parent
544a2534c5
commit
e8db435e2e
|
@ -222,7 +222,7 @@ typedef struct {
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char user[TSDB_USER_LEN];
|
char user[TSDB_USER_LEN];
|
||||||
char pass[TSDB_PASSWORD_LEN];
|
char pass[TSDB_PASSWORD_LEN + 1];
|
||||||
char acct[TSDB_USER_LEN];
|
char acct[TSDB_USER_LEN];
|
||||||
int64_t createdTime;
|
int64_t createdTime;
|
||||||
int64_t updateTime;
|
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());
|
mGError("user:%s, failed to login while acquire user since %s", pReq->info.conn.user, terrstr());
|
||||||
goto CONN_OVER;
|
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);
|
mGError("user:%s, failed to auth while acquire user, input:%s", pReq->info.conn.user, connReq.passwd);
|
||||||
code = TSDB_CODE_RPC_AUTH_FAILURE;
|
code = TSDB_CODE_RPC_AUTH_FAILURE;
|
||||||
goto CONN_OVER;
|
goto CONN_OVER;
|
||||||
|
|
Loading…
Reference in New Issue