]> git.ipfire.org Git - thirdparty/freeradius-server.git/commit
update the tmpl_rules for argument parsing
authorAlan T. DeKok <aland@freeradius.org>
Sun, 9 Mar 2025 14:30:28 +0000 (10:30 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 9 Mar 2025 18:15:53 +0000 (14:15 -0400)
commit651773966dc8b5dfdbce79fbf65452fe3b0d50a6
tree2a7fc2415893eb8b49ea3d24eb9b7d7ec9bf3742
parent1b1445439c25de5019b2ab4dd5fabacb85ec3602
update the tmpl_rules for argument parsing

so that we don't do casts, etc. of the function arguments

add more checks, and produce better errors

when checking function arguments, we no longer assume that all
of the arguments have been parsed as a string.  Instead, they
may be parsed as some other data type.  We can then cast the
input expression to the expected data type for the argument.

this change also changes the expected output, where functions like
%md5() now print their parsed arguments as octet strings.
src/bin/unit_test_attribute.c
src/lib/unlang/xlat_tokenize.c
src/tests/keywords/xlat-action-fail
src/tests/unit/condition/base.txt
src/tests/unit/condition/regex.txt
src/tests/unit/xlat/base.txt
src/tests/unit/xlat/cond_base.txt
src/tests/unit/xlat/expr.txt