Unable to use regexp in virtual server
Hi everyone, I checked out the 3.0.x branch this morning, and I can't get it working. Part of the configuration is: authorize { [...] foreach Cisco-AVPair { if ("%{Foreach-Variable-0}" =~ /^circuit-id-tag=(.+)/ ) { <do something> } } [...] } The startup fails with the following error: <file>[38]: Invalid regular expression: <file>[38]: ^circuit-id-tag=(.+) <file>[38]: ^ Apparently, the failure comes from the computation of the size of the pattern. regex_compile() tries to find a NULL value in the 23 characters of the regexp, when obviously the length of the pattern is only 20. Am I missing something in the syntax of the virtual server configuration ? -- LRS This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
On Mar 5, 2015, at 7:52 AM, RESTOUX, Loïc <loic.restoux@capgemini.com> wrote:
The startup fails with the following error:
<file>[38]: Invalid regular expression: <file>[38]: ^circuit-id-tag=(.+) <file>[38]: ^
I don’t see that here.
Apparently, the failure comes from the computation of the size of the pattern. regex_compile() tries to find a NULL value in the 23 characters of the regexp, when obviously the length of the pattern is only 20.
Knowing more would help. Unfortunately getting more information means going into the deep recesses of the code, to see exactly what it’s doing, and why. Which OS is this for? What regular expression library are you using?
Am I missing something in the syntax of the virtual server configuration ?
Nope. It should work. Alan DeKok.
participants (2)
-
"RESTOUX, Loïc" -
Alan DeKok