Otherwise we don't properly unescape fixed values (e.g. \" in a double quoted string remains \" rather than becoming ")
if (tmpl_afrom_substr(ctx, &parsed_tmpl,
&FR_SBUFF_IN(cf_pair_value(to_parse), talloc_strlen(cf_pair_value(to_parse))),
- cf_pair_value_quote(to_parse), NULL, t_rules) < 0) {
+ cf_pair_value_quote(to_parse), value_parse_rules_quoted[cf_pair_value_quote(to_parse)],
+ t_rules) < 0) {
return -1;
}
*(void **)out = parsed_tmpl;
if (tmpl_afrom_substr(ctx, &parsed,
&FR_SBUFF_IN(cf_pair_value(to_parse), talloc_array_length(cf_pair_value(to_parse)) - 1),
- cf_pair_value_quote(to_parse), NULL, &our_rules) < 0) return -1;
+ cf_pair_value_quote(to_parse), value_parse_rules_quoted[cf_pair_value_quote(to_parse)],
+ &our_rules) < 0) return -1;
*(void **)out = parsed;
return 0;
if (tmpl_afrom_substr(ctx, &files_data->key_tmpl,
&FR_SBUFF_IN(cf_pair_value(to_parse), talloc_array_length(cf_pair_value(to_parse)) - 1),
- cf_pair_value_quote(to_parse), NULL, t_rules) < 0) return -1;
+ cf_pair_value_quote(to_parse), value_parse_rules_quoted[cf_pair_value_quote(to_parse)],
+ t_rules) < 0) return -1;
keytype = tmpl_expanded_type(files_data->key_tmpl);
if (fr_htrie_hint(keytype) == FR_HTRIE_INVALID) {
if (tmpl_afrom_substr(ctx, &parsed,
&FR_SBUFF_IN(cf_pair_value(to_parse), talloc_array_length(cf_pair_value(to_parse)) - 1),
- cf_pair_value_quote(to_parse), NULL, &our_rules) < 0) return -1;
+ cf_pair_value_quote(to_parse), value_parse_rules_quoted[cf_pair_value_quote(to_parse)],
+ &our_rules) < 0) return -1;
*(void **)out = parsed;
return 0;
slen = tmpl_afrom_substr(parsed_env, &parsed_tmpl,
&FR_SBUFF_IN(to_parse, talloc_array_length(to_parse) - 1),
- cf_pair_value_quote(cp), NULL, t_rules);
+ cf_pair_value_quote(cp), value_parse_rules_quoted[cf_pair_value_quote(cp)],
+ t_rules);
talloc_free(to_parse);
if (slen <= 0) {
if (tmpl_afrom_substr(parsed_env, &parsed_tmpl,
&FR_SBUFF_IN(cf_pair_value(to_parse), talloc_array_length(cf_pair_value(to_parse)) - 1),
- cf_pair_value_quote(to_parse), NULL, &our_rules) < 0) {
+ cf_pair_value_quote(to_parse), value_parse_rules_quoted[cf_pair_value_quote(to_parse)],
+ &our_rules) < 0) {
error:
call_env_parsed_free(out, parsed_env);
return -1;
slen = tmpl_afrom_substr(parsed_env, &parsed_tmpl,
&FR_SBUFF_IN(cf_pair_value(to_parse), talloc_array_length(cf_pair_value(to_parse)) - 1),
- cf_pair_value_quote(to_parse), NULL, &our_rules);
+ cf_pair_value_quote(to_parse), value_parse_rules_quoted[cf_pair_value_quote(to_parse)],
+ &our_rules);
if (slen <= 0) {
cf_canonicalize_error(to_parse, slen, "Failed parsing query", cf_pair_value(to_parse));
error:
if (tmpl_afrom_substr(ctx, &parsed_tmpl,
&FR_SBUFF_IN(cf_pair_value(to_parse), talloc_array_length(cf_pair_value(to_parse)) - 1),
- cf_pair_value_quote(to_parse), NULL, &our_rules) < 0) return -1;
+ cf_pair_value_quote(to_parse), value_parse_rules_quoted[cf_pair_value_quote(to_parse)],
+ &our_rules) < 0) return -1;
*(void **)out = parsed_tmpl;
return 0;
}
if (tmpl_afrom_substr(ctx, &parsed_tmpl,
&FR_SBUFF_IN(cf_pair_value(to_parse), talloc_array_length(cf_pair_value(to_parse)) - 1),
- cf_pair_value_quote(to_parse), NULL, &our_rules) < 0) return -1;
+ cf_pair_value_quote(to_parse), value_parse_rules_quoted[cf_pair_value_quote(to_parse)],
+ &our_rules) < 0) return -1;
*(void **)out = parsed_tmpl;
return 0;
}