Write-only property webserver.api.password should reset all sessions when being used
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
parent
fe3ed0bb74
commit
13e3421d4a
|
@ -383,7 +383,10 @@ int set_config_from_CLI(const char *key, const char *value)
|
|||
return 2;
|
||||
|
||||
// Check if value changed compared to current value
|
||||
if(!compare_config_item(conf_item->t, &new_item->v, &conf_item->v))
|
||||
// Also check if this is the password config item change as this
|
||||
// actually changed pwhash behind the scenes
|
||||
if(!compare_config_item(conf_item->t, &new_item->v, &conf_item->v) ||
|
||||
new_item == &newconf.webserver.api.password)
|
||||
{
|
||||
// Config item changed
|
||||
|
||||
|
|
|
@ -898,7 +898,7 @@ void initConfig(struct config *conf)
|
|||
conf->webserver.api.password.h = "Pi-hole web interface and API password. When set to something different than \""PASSWORD_VALUE"\", this property will compute the corresponding password hash to set webserver.api.pwhash";
|
||||
conf->webserver.api.password.a = cJSON_CreateStringReference("<valid Pi-hole password>");
|
||||
conf->webserver.api.password.t = CONF_PASSWORD;
|
||||
conf->webserver.api.password.f = FLAG_PSEUDO_ITEM;
|
||||
conf->webserver.api.password.f = FLAG_PSEUDO_ITEM | FLAG_INVALIDATE_SESSIONS;
|
||||
conf->webserver.api.password.d.s = (char*)"";
|
||||
|
||||
conf->webserver.api.totp_secret.k = "webserver.api.totp_secret";
|
||||
|
|
Loading…
Reference in New Issue