Expansion of \t and \n in message with linelong module

paul.moser at bt.com paul.moser at bt.com
Fri Mar 13 16:35:52 CET 2015



>>
>> Have there been any further thoughts/changes on either expansion of escaped characters in the linelog or coa functionality?
>>
>> I can see from the git commit that's there's been some changes around these areas, especially around xlat but a cursory try of  both 3.0.7 and head from git suggest not, although I could easily be doing something wrong.
>>
>> In the immediate future to allow me to  run on a recent FreeRadius version would I be better trying to proceed with getting a configuration running with correct_escapes = false?
>
>In v3.1.x you can use attribute references, which use the raw attribute value.
>
>For example if you set
>
>        format = &Tmp-String-0
>
>update request {
>        Tmp-String-0 := "foo\nbar"
>}
>
>It would write:
>
>foo
>bar
>
>You can also use the multi attribute selector
>
>        format = &Tmp-String-0[*]
>
>and log all instances with a line delimiter after each instance.
>
>The line delimiter can also be customised.
>
>Is that sufficient?

It does indeed work, however in testing it I've also discovered that my original (3.0.3) configuration of:

	format = "%t\n\tAcct-Status-Type = Start\n\tCalling-Station-Id = \"%{Calling-Station-Id}\"\n\tFramed-IP-Address = \"%{Framed-IP-Address}\"\n\tEvent-Timestamp = %l\n"
	
works again (it stopped working in 3.0.5/6). Is it now the case in 3.1.x that the string is expanded,( with the exception of the contents of included radius attributes which would be dangerous), or is this a regression?

It feels a bit early in the life of 3.1x  to put it on a production server, going with 3.0.7 with correct_escapes = false seems safer with a later swap to 3.1.x - once I've worked through the process for upgrading once hopefully the second time will be far simpler.


Thanks,

Paul




More information about the Freeradius-Users mailing list