mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-17 19:30:36 +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
+2
-2
@@ -4190,14 +4190,14 @@ static void dash_custom(struct mg_connection *c, int ev, void *ev_data) {
|
||||
(void) c, (void) ev, (void) ev_data;
|
||||
}
|
||||
|
||||
static int dash_authenticate(const char *user, const char *pass) {
|
||||
static int dash_authenticate(char *user, size_t userlen, const char *pass) {
|
||||
int level = 0;
|
||||
if (strcmp(pass, "admin") == 0) {
|
||||
level = 7;
|
||||
} else if (strcmp(pass, "user") == 0) {
|
||||
level = 3;
|
||||
}
|
||||
(void) user;
|
||||
(void) user, (void) userlen;
|
||||
return level;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user