freeradius-server icon indicating copy to clipboard operation
freeradius-server copied to clipboard

One letter expansions seem to break other expansions in the users file

Open arr2036 opened this issue 7 years ago • 2 comments

Issue type

  • Questions about the server or its usage should be posted to the users mailing list.
  • Remote security exploits MUST be sent to [email protected].
  • [ ] Defect - Crash or memory corruption.
  • [ ] Defect - Non compliance with a standards document, or incorrect API usage.
  • [x ] Defect - Unexpected behaviour (obvious or verified by project member).
  • [ ] Feature request.

See here for debugging instructions and how to obtain backtraces.

Defect/Feature description

How to reproduce issue

Use the "%T" expansion in the reply list in an entry in the users file. Not only will it not expand, but it'll break all other expansions on that lite.

arr2036 avatar Apr 23 '18 02:04 arr2036

https://github.com/FreeRADIUS/freeradius-server/blob/v4.0.x/src/lib/util/pair.c#L2770

If you do %{User-Name} %T it works. Doing %T %{User-Name} fails.

alandekok avatar Apr 23 '18 14:04 alandekok

Ah, we can do much better than that now i.e. feed the string to xlat parser and see what it says.

arr2036 avatar Apr 24 '18 11:04 arr2036