Ignore passwd in persisted configurations

If a passwd parameter is defined in a persisted configuration, it will be
ignored. This will make upgrades from 2.2 to 2.3 possible with persisted
configurations.
This commit is contained in:
Markus Mäkelä 2018-08-07 00:09:22 +03:00
parent b68d9920cf
commit 93946375ca
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -601,6 +601,17 @@ static int ini_handler(void *userdata, const char *section, const char *name, co
CONFIG_CONTEXT *cntxt = (CONFIG_CONTEXT *)userdata;
CONFIG_CONTEXT *ptr = cntxt;
const std::set<std::string> legacy_parameters{"passwd"};
if (is_persisted_config && legacy_parameters.count(name))
{
/**
* Ignore legacy parameters in persisted configurations. Needs to be
* done to make upgrades from pre-2.3 versions work.
*/
return 1;
}
if (is_empty_string(value))
{
if (is_persisted_config)