mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-13 17:00:19 +00:00
Change dash auth signature
This commit is contained in:
1 parent
e923b413ae
commit
73037880e6
7 files changed
+19
-12
No files matched your search
+1
-1
@@ -354,7 +354,7 @@ static struct mg_dash_user *mg_dash_authenticate(struct mg_http_message *hm,
|
||||
struct mg_str *ah = mg_http_get_header(hm, "Authorization");
|
||||
if (ah != NULL) {
|
||||
// Auth header and password are set, auth by user/password via glue API
|
||||
int num_users = 0, level = dash->authenticate(user, pass);
|
||||
int num_users = 0, level = dash->authenticate(user, sizeof(user), pass);
|
||||
MG_DEBUG(("user %s, level: %d", user, level));
|
||||
if (level > 0) { // Proceed only if the firmware authenticated us
|
||||
for (u = s_users; u != NULL && result == NULL;
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ struct mg_dash_file {
|
||||
struct mg_dash {
|
||||
struct mg_field_set *sets;
|
||||
struct mg_dash_custom_handler *custom_handlers;
|
||||
int (*authenticate)(const char *user, const char *pass);
|
||||
int (*authenticate)(char *user, size_t userlen, const char *pass);
|
||||
int session_auto_expiration_seconds;
|
||||
//struct mg_dash_file *files;
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user