Skip to content
Snippets Groups Projects
Commit df95f098 authored by deuce's avatar deuce
Browse files

Allow overriding AccessRequirements to a zero-length string.

This allows disabling authentication after a higher level specifies an
AccessRequirements value, eliminating the last reason to keep access.ars
around.
parent fe6714ba
No related branches found
No related tags found
No related merge requests found
...@@ -3351,9 +3351,18 @@ static void read_webctrl_section(FILE *file, char *section, http_session_t *sess ...@@ -3351,9 +3351,18 @@ static void read_webctrl_section(FILE *file, char *section, http_session_t *sess
int i; int i;
char str[MAX_PATH+1]; char str[MAX_PATH+1];
named_string_t **values; named_string_t **values;
char *p;
if(iniReadString(file, section, "AccessRequirements", session->req.ars,str)==str) p = iniReadExistingString(file, section, "AccessRequirements", session->req.ars, str);
SAFECOPY(session->req.ars,str); /*
* If p == NULL, the key doesn't exist, retain default
* If p == default, zero-length string present, truncate req.ars
* Otherwise, p is new value and is updated
*/
if (p == session->req.ars)
session->req.ars[0] = 0;
else if (p != NULL)
SAFECOPY(session->req.ars,p);
if(iniReadString(file, section, "Realm", scfg.sys_name,str)==str) { if(iniReadString(file, section, "Realm", scfg.sys_name,str)==str) {
FREE_AND_NULL(session->req.realm); FREE_AND_NULL(session->req.realm);
/* FREE()d in close_request() */ /* FREE()d in close_request() */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment