]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
16 months agoScheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar
github-actions[bot] [Tue, 8 Apr 2025 09:35:13 +0000 (09:35 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar

16 months agoScheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar
github-actions[bot] [Tue, 8 Apr 2025 09:35:01 +0000 (09:35 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar

16 months agoScheduled fuzzing: Update src/tests/fuzzer-corpus/tftp.tar
github-actions[bot] [Tue, 8 Apr 2025 09:34:59 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tftp.tar

16 months agoScheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar
github-actions[bot] [Tue, 8 Apr 2025 09:34:55 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar

16 months agoScheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar
github-actions[bot] [Tue, 8 Apr 2025 09:34:52 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar

16 months agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar
github-actions[bot] [Tue, 8 Apr 2025 09:34:50 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar

16 months agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar
github-actions[bot] [Tue, 8 Apr 2025 09:34:43 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar

16 months agoScheduled fuzzing: Update src/tests/fuzzer-corpus/bfd.tar
github-actions[bot] [Tue, 8 Apr 2025 09:34:31 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/bfd.tar

16 months agoforce stringification of quoted strings for the old xlat evaluator.
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.

16 months agodocs: update howto/Datastores/Active Directory install/configure instructions
nolade [Mon, 31 Mar 2025 19:32:53 +0000 (15:32 -0400)] 
docs: update howto/Datastores/Active Directory install/configure instructions

16 months agoAdded 'frag errors' info to introduction/trouble-shooting/connectivity section
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

16 months agodocs: Update howto/datastores/ad
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

16 months agowe no longer need a macro for escape
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.

16 months agoinitialize and print out constant flag
Alan T. DeKok [Thu, 3 Apr 2025 14:58:29 +0000 (10:58 -0400)] 
initialize and print out constant flag

16 months agoadd tmpl normalization to xlat_tokenize_word()
Alan T. DeKok [Thu, 3 Apr 2025 13:36:28 +0000 (09:36 -0400)] 
add tmpl normalization to xlat_tokenize_word()

16 months agoadd tmpl tokenize and triple quotes 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

16 months agomove the expression parser back to tokenize_argv()
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

16 months agominor float fixes
Alan T. DeKok [Sun, 6 Apr 2025 14:30:02 +0000 (10:30 -0400)] 
minor float fixes

for numerical stability

16 months agoadd cast of float to time_delta
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

16 months agoprint out scale and raw values for time_delta
Alan T. DeKok [Sun, 6 Apr 2025 10:14:26 +0000 (06:14 -0400)] 
print out scale and raw values for time_delta

16 months agosimplify parsing of 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.

16 months agotypos and tweaks
Alan T. DeKok [Sat, 5 Apr 2025 15:57:35 +0000 (11:57 -0400)] 
typos and tweaks

16 months agoconcatenate function arguments when evaluating
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.

16 months agomore quote arguments
Alan T. DeKok [Sat, 5 Apr 2025 14:42:29 +0000 (10:42 -0400)] 
more quote arguments

16 months agoquote function parameters which are bare words
Alan T. DeKok [Sat, 5 Apr 2025 13:23:28 +0000 (09:23 -0400)] 
quote function parameters which are bare words

16 months agoensure an empty string has a value
Alan T. DeKok [Sat, 5 Apr 2025 13:10:42 +0000 (09:10 -0400)] 
ensure an empty string has a value

16 months ago"%{1}" should result in an empty string if %{1} doesn't exist
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

16 months agostrings may have embedded NULs
Alan T. DeKok [Fri, 4 Apr 2025 11:05:13 +0000 (07:05 -0400)] 
strings may have embedded NULs

16 months agohoist tokenize bare word / string out of xlat_tokenize_argv
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()

16 months agoallow escape functions to return 1 for "I mashed safe_for already"
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"

16 months agouse strdup_shallow_replace here, too
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.

16 months agodon't mash safe_for if the function already did it
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

16 months agomove to strdup_shallow_replace here, too
Alan T. DeKok [Wed, 2 Apr 2025 10:00:19 +0000 (06:00 -0400)] 
move to strdup_shallow_replace here, too

16 months agospelling fixes, and print out errors using RP...
Alan T. DeKok [Wed, 2 Apr 2025 01:05:09 +0000 (21:05 -0400)] 
spelling fixes, and print out errors using RP...

16 months agouse fr_value_box_strdup_shallow_replace
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

16 months agoremove unnecessary initialization
Alan T. DeKok [Wed, 2 Apr 2025 01:03:31 +0000 (21:03 -0400)] 
remove unnecessary initialization

16 months agoset default safe value for literals
Alan T. DeKok [Wed, 2 Apr 2025 01:03:00 +0000 (21:03 -0400)] 
set default safe value for literals

16 months agoremove debugging
Alan T. DeKok [Wed, 2 Apr 2025 01:01:28 +0000 (21:01 -0400)] 
remove debugging

16 months agoquiet static analysis
Alan T. DeKok [Wed, 2 Apr 2025 00:26:18 +0000 (20:26 -0400)] 
quiet static analysis

16 months agoInitialise to suppress complier warning
Nick Porter [Tue, 1 Apr 2025 20:36:30 +0000 (21:36 +0100)] 
Initialise to suppress complier warning

16 months agoCast to suppress compiler warning
Nick Porter [Tue, 1 Apr 2025 20:35:35 +0000 (21:35 +0100)] 
Cast to suppress compiler warning

16 months agoRemove type from static definition
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

16 months agoWe expect ldap.uri.escape to escape whatever it is given
Nick Porter [Tue, 1 Apr 2025 17:22:53 +0000 (18:22 +0100)] 
We expect ldap.uri.escape to escape whatever it is given

16 months agoAdd fr_value_box_is_safe_for_only()
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

16 months agoExit quickly if there's nothing to do
Nick Porter [Tue, 1 Apr 2025 14:14:31 +0000 (15:14 +0100)] 
Exit quickly if there's nothing to do

16 months agopre and post proxy don't exist now
Nick Porter [Tue, 1 Apr 2025 08:58:02 +0000 (09:58 +0100)] 
pre and post proxy don't exist now

16 months agoUse fr_value_box_strdup_shallow_replace for escaped value replacement
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

16 months agoCorrect macro
Nick Porter [Tue, 1 Apr 2025 16:51:30 +0000 (17:51 +0100)] 
Correct macro

16 months agomove fr_value_box_escape_t to a structure
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.

16 months agowe already have "len". No need to call talloc array length
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

16 months agoupdate montioring section - nave & copy/edit files
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

16 months agoquiet analyzer
Alan T. DeKok [Tue, 1 Apr 2025 01:17:40 +0000 (21:17 -0400)] 
quiet analyzer

16 months agoremove unused functions
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.

16 months agoallow parsing 192/8 and 192.0/16, etc.
Alan T. DeKok [Tue, 1 Apr 2025 00:39:19 +0000 (20:39 -0400)] 
allow parsing 192/8 and 192.0/16, etc.

16 months agofix the filename escape function to use the normal API
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

16 months agoprint out literals_safe_for in tmpl_rules_debug
Alan T. DeKok [Sun, 30 Mar 2025 17:20:26 +0000 (13:20 -0400)] 
print out literals_safe_for in tmpl_rules_debug

16 months agoReturn correctly after parsing error
Nick Porter [Mon, 31 Mar 2025 10:42:39 +0000 (11:42 +0100)] 
Return correctly after parsing error

16 months agoFree test list
Nick Porter [Mon, 31 Mar 2025 09:04:59 +0000 (10:04 +0100)] 
Free test list

16 months agoTest time_offset in rlm_totp
Nick Porter [Fri, 28 Mar 2025 20:24:06 +0000 (20:24 +0000)] 
Test time_offset in rlm_totp

16 months agoAdd time_offset to 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.

16 months agoReplace dictionary.rfc3825 with dictionary.rfc6225
Nick Porter [Fri, 28 Mar 2025 16:54:56 +0000 (16:54 +0000)] 
Replace dictionary.rfc3825 with dictionary.rfc6225

RFC6225 obsoletes RFC3825

16 months ago%map() returns bool, not int8
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.

16 months agotrack safety of regex data
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.

16 months agoreturn VOID is not NULL
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

16 months agoremove "tainted" argument from fr_value_box_from_str()
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.

16 months agocopy value box safety thingies in more places
Alan T. DeKok [Sat, 29 Mar 2025 20:11:57 +0000 (16:11 -0400)] 
copy value box safety thingies in more places

16 months agoremove unused function
Alan T. DeKok [Sat, 29 Mar 2025 19:48:20 +0000 (15:48 -0400)] 
remove unused function

16 months agomove concat functions to taking an output value-box
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.

16 months agoit helps to initialize the output value-box
Alan T. DeKok [Sat, 29 Mar 2025 18:40:07 +0000 (14:40 -0400)] 
it helps to initialize the output value-box

16 months agoallow debug level to be changed dynamically
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"

16 months agoadd and use fr_value_box_safety copy / merge
Alan T. DeKok [Sat, 29 Mar 2025 15:37:58 +0000 (11:37 -0400)] 
add and use fr_value_box_safety copy / merge

16 months agosimplify %exists()
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

16 months agotypo
Alan T. DeKok [Sat, 29 Mar 2025 13:34:58 +0000 (09:34 -0400)] 
typo

16 months agodocs: Add howto/Datastore section & AD/LDAP/SQL/REDIS subsections.
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.

16 months agoadd and document regex.escape()
Alan T. DeKok [Fri, 28 Mar 2025 18:34:02 +0000 (14:34 -0400)] 
add and document regex.escape()

which always escapes the input

16 months agomove regex escape rules to regex code
Alan T. DeKok [Fri, 28 Mar 2025 17:53:40 +0000 (13:53 -0400)] 
move regex escape rules to regex code

16 months agoAdd tests for nested timers
Arran Cudbard-Bell [Fri, 28 Mar 2025 05:46:25 +0000 (23:46 -0600)] 
Add tests for nested timers

16 months agoDisarm a list of timers
Arran Cudbard-Bell [Fri, 28 Mar 2025 05:45:46 +0000 (23:45 -0600)] 
Disarm a list of timers

16 months agoCheck for parent not tl->parent
Arran Cudbard-Bell [Fri, 28 Mar 2025 05:45:38 +0000 (23:45 -0600)] 
Check for parent not tl->parent

16 months agoPassing a NULL pointer to fr_timer_disarm is a noop
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

16 months agoParent nested list events from the nested list
Arran Cudbard-Bell [Fri, 28 Mar 2025 05:45:14 +0000 (23:45 -0600)] 
Parent nested list events from the nested list

16 months agoAdd out of order inserts test
Arran Cudbard-Bell [Fri, 28 Mar 2025 04:32:32 +0000 (22:32 -0600)] 
Add out of order inserts test

16 months agore-enable regex escape
Alan T. DeKok [Fri, 28 Mar 2025 17:30:25 +0000 (13:30 -0400)] 
re-enable regex escape

16 months agoremove last vestiges of tmpl_attr_prefix_t
Alan T. DeKok [Fri, 28 Mar 2025 17:00:55 +0000 (13:00 -0400)] 
remove last vestiges of tmpl_attr_prefix_t

16 months agoremove all references to tmpl_attr_prefix
Alan T. DeKok [Fri, 28 Mar 2025 15:08:07 +0000 (11:08 -0400)] 
remove all references to tmpl_attr_prefix

16 months agoignore prefix flags when parsing attributes
Alan T. DeKok [Fri, 28 Mar 2025 14:23:18 +0000 (10:23 -0400)] 
ignore prefix flags when parsing attributes

16 months agoremove prefix flag from tmpl print routines
Alan T. DeKok [Fri, 28 Mar 2025 14:08:45 +0000 (10:08 -0400)] 
remove prefix flag from tmpl print routines

16 months agoalways parse the LHS of a map as an attribute
Alan T. DeKok [Fri, 28 Mar 2025 14:03:04 +0000 (10:03 -0400)] 
always parse the LHS of a map as an attribute

16 months agolet the tmpl code decide if it's an attribute or a value
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

16 months agomove to prefix AUTO
Alan T. DeKok [Thu, 27 Mar 2025 20:40:30 +0000 (16:40 -0400)] 
move to prefix AUTO

16 months agomark unsafe attributes as SAFE_FOR_NONE
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

16 months agoadd unsafe to dict_attr_flags_t
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.

16 months agoRedis MOVED reply is not an error
Nick Porter [Thu, 27 Mar 2025 19:46:55 +0000 (19:46 +0000)] 
Redis MOVED reply is not an error

16 months agoAdd more tests
Arran Cudbard-Bell [Fri, 28 Mar 2025 02:34:50 +0000 (20:34 -0600)] 
Add more tests

16 months agoTypos
Arran Cudbard-Bell [Fri, 28 Mar 2025 02:34:41 +0000 (20:34 -0600)] 
Typos

16 months agoCheck result of disarming the child
Arran Cudbard-Bell [Fri, 28 Mar 2025 02:34:35 +0000 (20:34 -0600)] 
Check result of disarming the child

16 months agoSupport calling fr_timer_run within an event
Arran Cudbard-Bell [Fri, 28 Mar 2025 02:33:52 +0000 (20:33 -0600)] 
Support calling fr_timer_run within an event

16 months agoHave to use O(N) move for inserting deffered events
Arran Cudbard-Bell [Fri, 28 Mar 2025 02:33:34 +0000 (20:33 -0600)] 
Have to use O(N) move for inserting deffered events

16 months agoBasic timer tests
Arran Cudbard-Bell [Thu, 27 Mar 2025 19:16:01 +0000 (13:16 -0600)] 
Basic timer tests

16 months agoUse a separate field for tracking the timer event's position in the ordered list
Arran Cudbard-Bell [Thu, 27 Mar 2025 19:15:14 +0000 (13:15 -0600)] 
Use a separate field for tracking the timer event's position in the ordered list