]>
git.ipfire.org Git - thirdparty/freeradius-server.git/log
Alan T. DeKok [Tue, 8 Apr 2025 22:29:12 +0000 (18:29 -0400)]
we don't allow unresolved xlats
it helps to return errors when there are error cases.
Disallow "foo." for list existence. Arguably "foo.[*]" is better.
the xlat condition / expression parser already replaces a bare
existence check with a %exists() wrapper. So the run-time code
doesn't need to expand the entire thing.
Alan T. DeKok [Tue, 8 Apr 2025 12:32:05 +0000 (08:32 -0400)]
call stringify even if there's no escape
and mark safe_for depending on whether or not there's no escape
github-actions[bot] [Tue, 8 Apr 2025 09:35:19 +0000 (09:35 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar
github-actions[bot] [Tue, 8 Apr 2025 09:35:13 +0000 (09:35 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar
github-actions[bot] [Tue, 8 Apr 2025 09:35:01 +0000 (09:35 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar
github-actions[bot] [Tue, 8 Apr 2025 09:34:59 +0000 (09:34 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tftp.tar
github-actions[bot] [Tue, 8 Apr 2025 09:34:55 +0000 (09:34 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar
github-actions[bot] [Tue, 8 Apr 2025 09:34:52 +0000 (09:34 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar
github-actions[bot] [Tue, 8 Apr 2025 09:34:50 +0000 (09:34 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar
github-actions[bot] [Tue, 8 Apr 2025 09:34:43 +0000 (09:34 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar
github-actions[bot] [Tue, 8 Apr 2025 09:34:31 +0000 (09:34 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/bfd.tar
Alan T. DeKok [Mon, 7 Apr 2025 18:20:06 +0000 (14:20 -0400)]
force stringification of quoted strings for the old xlat evaluator.
when we see a value-box group, it is likely for a string which
has been converted to an XLAT_GROUP. In that case, stringify it
before escaping it.
nolade [Mon, 31 Mar 2025 19:32:53 +0000 (15:32 -0400)]
docs: update howto/Datastores/Active Directory install/configure instructions
nolade [Thu, 3 Apr 2025 21:22:01 +0000 (17:22 -0400)]
Added 'frag errors' info to introduction/trouble-shooting/connectivity section
update nav bar
nolade [Mon, 31 Mar 2025 19:32:53 +0000 (15:32 -0400)]
docs: Update howto/datastores/ad
docs: update howto/Datastores/Active Directory install/configure instructions.
Added 3 sub-sections - Integrating AD, Configuring ntlm, Installing winbind
Alan T. DeKok [Sun, 6 Apr 2025 20:09:12 +0000 (16:09 -0400)]
we no longer need a macro for escape
rearrange the code so that the escaping is done first.
but we do assert that the value-boxes are not groups, in preparation
for updating the expression parser. Those changes mean that a
string which contains an xlat expansion will result in a group
of the component pieces. We can then escape each component piece
individually, before concatenating them into the resulting string.
Alan T. DeKok [Thu, 3 Apr 2025 14:58:29 +0000 (10:58 -0400)]
initialize and print out constant flag
Alan T. DeKok [Thu, 3 Apr 2025 13:36:28 +0000 (09:36 -0400)]
add tmpl normalization to xlat_tokenize_word()
Alan T. DeKok [Thu, 3 Apr 2025 13:03:12 +0000 (09:03 -0400)]
add tmpl tokenize and triple quotes to xlat_tokenize_word
in preparation for calling it from xlat_tokenize_expression
Alan T. DeKok [Wed, 2 Apr 2025 20:53:11 +0000 (16:53 -0400)]
move the expression parser back to tokenize_argv()
and hoist the parse rules for quoted text back, too.
This is in preparation for making xlat_tokenize_word() semi-public,
and calling it from xlat_tokenize_expression
Alan T. DeKok [Sun, 6 Apr 2025 14:30:02 +0000 (10:30 -0400)]
minor float fixes
for numerical stability
Alan T. DeKok [Sun, 6 Apr 2025 10:23:46 +0000 (06:23 -0400)]
add cast of float to time_delta
and it turns out that the cast-time_delta test was wrong. Which
resulted in discovering that parsing time_delta decimals was wrong.
added "cast" function to unit_test_attribute. Added tests for
casting to unit tests.
update cast-time_delta test to use correct values, and to do
delta comparisons for floating points
Alan T. DeKok [Sun, 6 Apr 2025 10:14:26 +0000 (06:14 -0400)]
print out scale and raw values for time_delta
Alan T. DeKok [Sun, 6 Apr 2025 01:40:21 +0000 (21:40 -0400)]
simplify parsing of time_delta
the old code parsed fractions incorrectly. Rather than trying to
debug and fix it, we just change the code to parse floating point
numbers.
Alan T. DeKok [Sat, 5 Apr 2025 15:57:35 +0000 (11:57 -0400)]
typos and tweaks
Alan T. DeKok [Sat, 5 Apr 2025 14:51:22 +0000 (10:51 -0400)]
concatenate function arguments when evaluating
the edit code already does this. The function argument code
did not. The result was that the functions were being passed
value-box lists / groups, when the intention of the admin was
to pass in one quoted string.
The xlat expression parser "fixed" this issue by adding a cast
when it parsed strings. But that cast would then encapsulate the
function arguments into another function call. That either
prevented the escaping of strings, or did the concatentation to
string which then mashed it to SAFE_FOR_NONE.
The final string would then be escaped, which is not what the
admin intended.
Alan T. DeKok [Sat, 5 Apr 2025 14:42:29 +0000 (10:42 -0400)]
more quote arguments
Alan T. DeKok [Sat, 5 Apr 2025 13:23:28 +0000 (09:23 -0400)]
quote function parameters which are bare words
Alan T. DeKok [Sat, 5 Apr 2025 13:10:42 +0000 (09:10 -0400)]
ensure an empty string has a value
Alan T. DeKok [Sat, 5 Apr 2025 13:08:59 +0000 (09:08 -0400)]
"%{1}" should result in an empty string if %{1} doesn't exist
Alan T. DeKok [Fri, 4 Apr 2025 11:05:13 +0000 (07:05 -0400)]
strings may have embedded NULs
Alan T. DeKok [Wed, 2 Apr 2025 12:56:07 +0000 (08:56 -0400)]
hoist tokenize bare word / string out of xlat_tokenize_argv
in preparation for calling it from xlat_tokenize_expression()
Alan T. DeKok [Wed, 2 Apr 2025 10:45:57 +0000 (06:45 -0400)]
allow escape functions to return 1 for "I mashed safe_for already"
Alan T. DeKok [Wed, 2 Apr 2025 10:25:50 +0000 (06:25 -0400)]
use strdup_shallow_replace here, too
and update json to say that literals in the config files are
safe for any.
Alan T. DeKok [Wed, 2 Apr 2025 10:05:54 +0000 (06:05 -0400)]
don't mash safe_for if the function already did it
Alan T. DeKok [Wed, 2 Apr 2025 10:00:19 +0000 (06:00 -0400)]
move to strdup_shallow_replace here, too
Alan T. DeKok [Wed, 2 Apr 2025 01:05:09 +0000 (21:05 -0400)]
spelling fixes, and print out errors using RP...
Alan T. DeKok [Wed, 2 Apr 2025 01:04:08 +0000 (21:04 -0400)]
use fr_value_box_strdup_shallow_replace
which is less work than the alternatives
Alan T. DeKok [Wed, 2 Apr 2025 01:03:31 +0000 (21:03 -0400)]
remove unnecessary initialization
Alan T. DeKok [Wed, 2 Apr 2025 01:03:00 +0000 (21:03 -0400)]
set default safe value for literals
Alan T. DeKok [Wed, 2 Apr 2025 01:01:28 +0000 (21:01 -0400)]
remove debugging
Alan T. DeKok [Wed, 2 Apr 2025 00:26:18 +0000 (20:26 -0400)]
quiet static analysis
Nick Porter [Tue, 1 Apr 2025 20:36:30 +0000 (21:36 +0100)]
Initialise to suppress complier warning
Nick Porter [Tue, 1 Apr 2025 20:35:35 +0000 (21:35 +0100)]
Cast to suppress compiler warning
Nick Porter [Tue, 1 Apr 2025 20:28:09 +0000 (21:28 +0100)]
Remove type from static definition
Causes "initializer element is not constant" error
Nick Porter [Tue, 1 Apr 2025 17:22:53 +0000 (18:22 +0100)]
We expect ldap.uri.escape to escape whatever it is given
Nick Porter [Tue, 1 Apr 2025 17:21:15 +0000 (18:21 +0100)]
Add fr_value_box_is_safe_for_only()
Where we need to specifically exclude SAFE_FOR_ANY - e.g. escaping
functions which may need to operate on literals
Nick Porter [Tue, 1 Apr 2025 14:14:31 +0000 (15:14 +0100)]
Exit quickly if there's nothing to do
Nick Porter [Tue, 1 Apr 2025 08:58:02 +0000 (09:58 +0100)]
pre and post proxy don't exist now
Nick Porter [Tue, 1 Apr 2025 16:52:45 +0000 (17:52 +0100)]
Use fr_value_box_strdup_shallow_replace for escaped value replacement
To avoid the box being re-initialised
Nick Porter [Tue, 1 Apr 2025 16:51:30 +0000 (17:51 +0100)]
Correct macro
Alan T. DeKok [Tue, 1 Apr 2025 14:56:18 +0000 (10:56 -0400)]
move fr_value_box_escape_t to a structure
which can then contain the function, a safe_for value, and an
always_escape parameter.
Alan T. DeKok [Tue, 1 Apr 2025 01:33:38 +0000 (21:33 -0400)]
we already have "len". No need to call talloc array length
nolade [Thu, 27 Mar 2025 15:09:17 +0000 (11:09 -0400)]
update montioring section - nave & copy/edit files
docs: customer doc import HIVE 3360/3361 Monitoring section - nav update, add new fileis (tools)
Updated nav and logging files
Alan T. DeKok [Tue, 1 Apr 2025 01:17:40 +0000 (21:17 -0400)]
quiet analyzer
Alan T. DeKok [Tue, 1 Apr 2025 01:11:06 +0000 (21:11 -0400)]
remove unused functions
in the interest of removing 'tainted', remove functions which
use 'tainted', but which aren't used anywhere.
Alan T. DeKok [Tue, 1 Apr 2025 00:39:19 +0000 (20:39 -0400)]
allow parsing 192/8 and 192.0/16, etc.
Alan T. DeKok [Mon, 31 Mar 2025 16:39:34 +0000 (12:39 -0400)]
fix the filename escape function to use the normal API
make sure that tainted boxes are marked as unsafe.
Add test for filename functions
Alan T. DeKok [Sun, 30 Mar 2025 17:20:26 +0000 (13:20 -0400)]
print out literals_safe_for in tmpl_rules_debug
Nick Porter [Mon, 31 Mar 2025 10:42:39 +0000 (11:42 +0100)]
Return correctly after parsing error
Nick Porter [Mon, 31 Mar 2025 09:04:59 +0000 (10:04 +0100)]
Free test list
Nick Porter [Fri, 28 Mar 2025 20:24:06 +0000 (20:24 +0000)]
Test time_offset in rlm_totp
Nick Porter [Fri, 28 Mar 2025 20:23:20 +0000 (20:23 +0000)]
Add time_offset to rlm_totp
Comparable to using TOTP-Time-Offset in the control list in v3.2, but
using the v4 approach of allowing the attribute to be set.
Nick Porter [Fri, 28 Mar 2025 16:54:56 +0000 (16:54 +0000)]
Replace dictionary.rfc3825 with dictionary.rfc6225
RFC6225 obsoletes RFC3825
Alan T. DeKok [Sat, 29 Mar 2025 23:52:01 +0000 (19:52 -0400)]
%map() returns bool, not int8
and isn't it really %eval(), but with assignment?
The normal %eval() evaluates conditions and expressions.
Alan T. DeKok [Sat, 29 Mar 2025 23:20:16 +0000 (19:20 -0400)]
track safety of regex data
so that if we do regex captures of something which is SAFE_FOR_SQL,
the resulting string is also SAFE_FOR_SQL.
There are odd cases where this _might_ be wrong, such as when
the capture text crosses a quoted string boundary. But that is
arguably the fault of the admin who created the offending regex,
and decided to use it in an unsafe manner.
Alan T. DeKok [Sat, 29 Mar 2025 23:02:30 +0000 (19:02 -0400)]
return VOID is not NULL
this check also allows us to check that the function was
declared to return nothing, but actually returned something
Alan T. DeKok [Sat, 29 Mar 2025 20:50:16 +0000 (16:50 -0400)]
remove "tainted" argument from fr_value_box_from_str()
either the value was set to false, OR the output "safe_for"
was set to an appropriate value.
Alan T. DeKok [Sat, 29 Mar 2025 20:11:57 +0000 (16:11 -0400)]
copy value box safety thingies in more places
Alan T. DeKok [Sat, 29 Mar 2025 19:48:20 +0000 (15:48 -0400)]
remove unused function
Alan T. DeKok [Sat, 29 Mar 2025 18:43:23 +0000 (14:43 -0400)]
move concat functions to taking an output value-box
where the safe_for / tainted / secret flags are now stored.
This helps to get rid of "tainted", which is a good thing.
It moves multiple arguments to one.
It means that we can now track the safe_for value across
concatenation. The previous code didn't track the safty
values across concatenation.
Alan T. DeKok [Sat, 29 Mar 2025 18:40:07 +0000 (14:40 -0400)]
it helps to initialize the output value-box
Alan T. DeKok [Sat, 29 Mar 2025 16:55:58 +0000 (12:55 -0400)]
allow debug level to be changed dynamically
%debug(4) didn't actually do anything, because it changed
request->log.lvl. And the log_request() function didn't check
that.
Update the code to log the message if either the _entire_ request
is marked as "log at this level" or if this particular destination
is marked as "log at this level"
Alan T. DeKok [Sat, 29 Mar 2025 15:37:58 +0000 (11:37 -0400)]
add and use fr_value_box_safety copy / merge
Alan T. DeKok [Thu, 27 Mar 2025 18:17:02 +0000 (14:17 -0400)]
simplify %exists()
it should only be called internally, and shouldn't be called
bu admins. So remove that functionality
Alan T. DeKok [Sat, 29 Mar 2025 13:34:58 +0000 (09:34 -0400)]
typo
nolade [Fri, 28 Mar 2025 17:54:52 +0000 (13:54 -0400)]
docs: Add howto/Datastore section & AD/LDAP/SQL/REDIS subsections.
he datastore/<type>.adoc files are stubs with headings only.
Alan T. DeKok [Fri, 28 Mar 2025 18:34:02 +0000 (14:34 -0400)]
add and document regex.escape()
which always escapes the input
Alan T. DeKok [Fri, 28 Mar 2025 17:53:40 +0000 (13:53 -0400)]
move regex escape rules to regex code
Arran Cudbard-Bell [Fri, 28 Mar 2025 05:46:25 +0000 (23:46 -0600)]
Add tests for nested timers
Arran Cudbard-Bell [Fri, 28 Mar 2025 05:45:46 +0000 (23:45 -0600)]
Disarm a list of timers
Arran Cudbard-Bell [Fri, 28 Mar 2025 05:45:38 +0000 (23:45 -0600)]
Check for parent not tl->parent
Arran Cudbard-Bell [Fri, 28 Mar 2025 05:45:29 +0000 (23:45 -0600)]
Passing a NULL pointer to fr_timer_disarm is a noop
Arran Cudbard-Bell [Fri, 28 Mar 2025 05:45:14 +0000 (23:45 -0600)]
Parent nested list events from the nested list
Arran Cudbard-Bell [Fri, 28 Mar 2025 04:32:32 +0000 (22:32 -0600)]
Add out of order inserts test
Alan T. DeKok [Fri, 28 Mar 2025 17:30:25 +0000 (13:30 -0400)]
re-enable regex escape
Alan T. DeKok [Fri, 28 Mar 2025 17:00:55 +0000 (13:00 -0400)]
remove last vestiges of tmpl_attr_prefix_t
Alan T. DeKok [Fri, 28 Mar 2025 15:08:07 +0000 (11:08 -0400)]
remove all references to tmpl_attr_prefix
Alan T. DeKok [Fri, 28 Mar 2025 14:23:18 +0000 (10:23 -0400)]
ignore prefix flags when parsing attributes
Alan T. DeKok [Fri, 28 Mar 2025 14:08:45 +0000 (10:08 -0400)]
remove prefix flag from tmpl print routines
Alan T. DeKok [Fri, 28 Mar 2025 14:03:04 +0000 (10:03 -0400)]
always parse the LHS of a map as an attribute
Alan T. DeKok [Fri, 28 Mar 2025 13:45:52 +0000 (09:45 -0400)]
let the tmpl code decide if it's an attribute or a value
Alan T. DeKok [Thu, 27 Mar 2025 20:40:30 +0000 (16:40 -0400)]
move to prefix AUTO
Alan T. DeKok [Wed, 26 Mar 2025 20:56:32 +0000 (16:56 -0400)]
mark unsafe attributes as SAFE_FOR_NONE
no matter where they come from. This catches SQL and the files
module. The usersfile code sets SAFE_FOR_ANY, but that is then
over-ridden with da->flags.unsafe. If we later want to make the
SQL module default to SAFE_FOR_ANY, we can make that change
without affecting the security of Cleartext-Password
Assert that creating pairs from random strings always results in
the output value box being unsafe for anything
Alan T. DeKok [Wed, 26 Mar 2025 20:10:56 +0000 (16:10 -0400)]
add unsafe to dict_attr_flags_t
which is mainly for Password.Cleartext. That is user-supplied
input, and is unsafe no matter where it comes from.
Nick Porter [Thu, 27 Mar 2025 19:46:55 +0000 (19:46 +0000)]
Redis MOVED reply is not an error
Arran Cudbard-Bell [Fri, 28 Mar 2025 02:34:50 +0000 (20:34 -0600)]
Add more tests
Arran Cudbard-Bell [Fri, 28 Mar 2025 02:34:41 +0000 (20:34 -0600)]
Typos
Arran Cudbard-Bell [Fri, 28 Mar 2025 02:34:35 +0000 (20:34 -0600)]
Check result of disarming the child
Arran Cudbard-Bell [Fri, 28 Mar 2025 02:33:52 +0000 (20:33 -0600)]
Support calling fr_timer_run within an event