mirror of
https://dev.iopsys.eu/bbf/icwmp.git
synced 2026-03-06 09:21:14 +01:00
Ticket refs #15759: CMWP authentication with blank credentials
This commit is contained in:
parent
12d58fcfa7
commit
9f300a44bd
2 changed files with 17 additions and 1 deletions
16
config.c
16
config.c
|
|
@ -678,6 +678,14 @@ int get_global_config(struct config *conf)
|
|||
conf->cpe_userid = value;
|
||||
value = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (conf->cpe_userid!=NULL)
|
||||
{
|
||||
free(conf->cpe_userid);
|
||||
}
|
||||
conf->cpe_userid = strdup("");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -694,6 +702,14 @@ int get_global_config(struct config *conf)
|
|||
conf->cpe_passwd = value;
|
||||
value = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (conf->cpe_passwd!=NULL)
|
||||
{
|
||||
free(conf->cpe_passwd);
|
||||
}
|
||||
conf->cpe_passwd = strdup("");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -371,7 +371,7 @@ int http_digest_auth_check(const char *http_method, const char *url,
|
|||
char un[MAX_USERNAME_LENGTH];
|
||||
|
||||
len = lookup_sub_value(un, sizeof(un), header, "username");
|
||||
if ((0 == len) || (0 != strcmp(username, un)))
|
||||
if (0 != strcmp(username, un))
|
||||
return MHD_NO;
|
||||
left -= strlen("username") + len;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue