Pull out libusers
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
#include <microhttpd.h>
|
||||
#include <sha256.h>
|
||||
#include <uuid/uuid.h>
|
||||
#include <dirent.h>
|
||||
|
||||
#include "path.h"
|
||||
#include "users.h"
|
||||
#include "noh.h"
|
||||
|
||||
Noh_Arena temp;
|
||||
|
||||
#include "users.c"
|
||||
|
||||
#define SV Noh_String_View
|
||||
#define sv noh_sv_from_cstr
|
||||
@@ -67,7 +66,7 @@ static bool authorize_user(struct MHD_Connection *connection, SV *username, Sett
|
||||
}
|
||||
|
||||
// Hash the provided password.
|
||||
hashed = hash_password(provided_username, provided_password);
|
||||
hashed = hash_password(&temp, provided_username, provided_password);
|
||||
|
||||
// Check the hash.
|
||||
if (!noh_sv_eq(noh_sv_from_string(hashed), user->hash)) {
|
||||
|
||||
Reference in New Issue
Block a user