\0 character at the end of the attibute value (authorization request)

Alan DeKok aland at deployingradius.com
Fri Mar 24 12:06:42 CET 2017


On Mar 24, 2017, at 3:15 AM, Peter Balsianok <balsianok.peter at gmail.com> wrote:
> Some client sends value + \0 character at the end of the attribute
> Calling-Station-Id (e.g. 421945411479\0 ).

  These clients are broken.  The vendor should be named and shamed.

  This behaviour has been forbidden by the RFCs for 20 years.  There is just no excuse for it.

> I am trying to fix / workaround this issue via unlang (in pre-proxy
> section):
> 
> update {
>  &proxy-request:Calling-Station-Id :=
> "%{string:&proxy-request:Calling-Station-Id}"
> }
> 
> Debug output:
> update {
> (0)       EXPAND %{string:&proxy-request:Calling-Station-Id}
> (0)          --> 421945411479
> (0)       &proxy-request:Calling-Station-Id := 421945411479
> (0)     } # update = noop
> 
> Is it good approach ?

  Yes.

> Could you please give me advice how to add \0 character at the end of the
> attribute value, if i want to send (test request) via radclient ?

  Add a \0.  It should work.

  Alan DeKok.




More information about the Freeradius-Users mailing list