Fixing \\\\ escapes \\\\\\\\\\

Stefan Paetow Stefan.Paetow at ja.net
Wed Oct 22 22:00:28 CEST 2014


Yay! :-)

Love it!

Stefan Paetow
Moonshot Industry & Research Liaison Coordinator

t: +44 (0)1235 822 125
gpg: 0x3FCE5142
xmpp: stefanp at jabber.dev.ja.net
skype: stefan.paetow.janet

Janet, the UK's research and education network.

Janet(UK) is a trading name of Jisc Collections and Janet Limited, a
not-for-profit company which is registered in England under No. 2881024
and whose Registered Office is at Lumen House, Library Avenue,
Harwell Oxford, Didcot, Oxfordshire. OX11 0SG. VAT No. 614944238


________________________________________
From: freeradius-users-bounces+stefan.paetow=ja.net at lists.freeradius.org [freeradius-users-bounces+stefan.paetow=ja.net at lists.freeradius.org] on behalf of Alan DeKok [aland at deployingradius.com]
Sent: 21 October 2014 20:12
To: FreeRadius users mailing list
Subject: Fixing \\\\ escapes \\\\\\\\\\

  I finally sat down and went through the source to fix \\ the \\\\
escaping \\\\\\\\ problem. \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

  The main issue is backwards compatibility.  The good news is that the
server continues to work as before, with no changes required to your
configuration.

  The *better* news is that if you edit radiusd.conf, and set:

        correct_escapes = true

  it will now require only one backslash, instead of many.  e.g.

        if (User-Name =~ /foo\.bar/) {
                ...
        }

  Will match User-Name = "foo.bar", as expected.

  This is a minor change which should get rid of severe annoyance in the
server.

  If you *don't* set "correct_escapes", you will need to use the old
method of:

        if (User-Name =~ /foo\\.bar/) {
                ...
        }

  Which is annoying.

  Please test the v3.0.x branch in git.  There *are* regression tests
for the new behavior, and they've been carefully checked.

  Alan DeKok.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


More information about the Freeradius-Users mailing list