Merge pull request #1707 from pi-hole/tweak/env_semicolon

Env var arrays are ;-delimited
This commit is contained in:
Adam Warner 2023-10-29 17:48:40 +00:00 committed by GitHub
commit 9cdb0828cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -932,8 +932,9 @@ bool readEnvValue(struct conf_item *conf_item, struct config *newconf)
// Free previously allocated JSON array
cJSON_Delete(conf_item->v.json);
conf_item->v.json = cJSON_CreateArray();
// Parse envvar array and generate a JSON array
const char delim[] =",;";
// Parse envvar array and generate a JSON array (env var
// arrays are ;-delimited)
const char delim[] =";";
const char *elem = strtok(envvar_copy, delim);
while(elem != NULL)
{