Skip to content

Commit

Permalink
feat: '*' for file whitelist
Browse files Browse the repository at this point in the history
if name doesn't matter
  • Loading branch information
ThisAMJ committed Aug 17, 2024
1 parent 908f889 commit ff1d3ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ int config_check_var_whitelist(struct var_whitelist *list, const char *var, cons
bool found = false;
while (list->var_name) {
if (strlen(var) >= strlen(list->var_name)) {
if (!strcmp(var + strlen(var) - strlen(list->var_name), list->var_name)) {
if (!strcmp("*", list->var_name) || !strcmp(var + strlen(var) - strlen(list->var_name), list->var_name)) {
found = true;
if (!list->val) return 2; // matching
if (!strcmp(list->val, val)) return 2; // matching
Expand Down

0 comments on commit ff1d3ae

Please sign in to comment.