mirror of
https://github.com/haiwen/seafile.git
synced 2025-01-07 03:17:13 +08:00
Check pwd hash and add crypt header (#2844)
Co-authored-by: yangheran <heran.yang@seafile.com>
This commit is contained in:
parent
9a149a6129
commit
8d16c1782a
@ -6,6 +6,8 @@
|
||||
#include "password-hash.h"
|
||||
#include "seafile-crypt.h"
|
||||
#include <openssl/rand.h>
|
||||
#include <openssl/aes.h>
|
||||
#include <openssl/evp.h>
|
||||
|
||||
#include "utils.h"
|
||||
#include "log.h"
|
||||
|
@ -1387,7 +1387,10 @@ seaf_clone_manager_add_download_task (SeafCloneManager *mgr,
|
||||
json_decref (object);
|
||||
}
|
||||
|
||||
if (passwd &&
|
||||
if (passwd && algo &&
|
||||
!check_pwd_hash_encryption_args (pwd_hash, enc_version, random_key, repo_salt, error)) {
|
||||
goto out;
|
||||
} else if (passwd &&
|
||||
!check_encryption_args (magic, enc_version, random_key, repo_salt, error)) {
|
||||
goto out;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user