mirror of
https://github.com/haiwen/seafile-server.git
synced 2025-08-18 23:08:01 +00:00
Don't print log when db password is ! (#673)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
This commit is contained in:
parent
49c860b50d
commit
0a084d3c8a
@ -847,8 +847,13 @@ validate_passwd_pbkdf2_sha256 (const char *passwd, const char *db_passwd)
|
|||||||
guint8 salt[SHA256_DIGEST_LENGTH];
|
guint8 salt[SHA256_DIGEST_LENGTH];
|
||||||
char hashed_passwd[SHA256_DIGEST_LENGTH*2+1];
|
char hashed_passwd[SHA256_DIGEST_LENGTH*2+1];
|
||||||
|
|
||||||
|
if (g_strcmp0 (db_passwd, "!") == 0)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
tokens = g_strsplit (db_passwd, "$", -1);
|
tokens = g_strsplit (db_passwd, "$", -1);
|
||||||
if (!tokens || g_strv_length (tokens) != 4) {
|
if (!tokens || g_strv_length (tokens) != 4) {
|
||||||
|
if (tokens)
|
||||||
|
g_strfreev (tokens);
|
||||||
ccnet_warning ("Invalide db passwd format %s.\n", db_passwd);
|
ccnet_warning ("Invalide db passwd format %s.\n", db_passwd);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user