1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-08-28 11:30:57 +00:00

Don't print log when db password is ! (#673)

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
This commit is contained in:
feiniks 2024-07-31 11:49:45 +08:00 committed by GitHub
parent 752988daa4
commit 5e6c0974e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;
} }