Fix problem with REGEX: xlat and strvalue #1574

Closed
wants to merge 1 commit into
from

Projects

None yet

1 participant

@0xbad0c0d3

This PR cause problem of radclient:
If you want send request from file and validate response by REGEX (=~ or !~) all checks will fail
for example

$ radclient -x 127.0.0.1 auth testRad -f test_ok.req:test_ok.res
Sent Access-Request Id 227 from 0.0.0.0:37328 to 127.0.0.1:1812 length 44
    User-Name = "5f27e8f3a41c:3108-3131"
Received Access-Accept Id 227 from 127.0.0.1:1812 to 0.0.0.0:0 length 26
    Reply-Message = "good"
(0) test_ok.req: Response for failed filter: Attribute value "good" didn't match filter: Reply-Message =~ ""

test_ok.res:

Response-Packet-Type == Access-Accept,
Reply-Message =~ 'good'

As you can see Reply-Message has value "good", regex should check same (Reply-Message =~ 'good') but validation fails...
After changes we have:

$ radclient -x 127.0.0.1 auth testRad -f test_ok.req:test_ok.res
Sent Access-Request Id 81 from 0.0.0.0:57126 to 127.0.0.1:1812 length 44
    User-Name = "5f27e8f3a41c:3108-3131"
Received Access-Accept Id 81 from 127.0.0.1:1812 to 0.0.0.0:0 length 26
    Reply-Message = "good"
(0) test_ok.req: Response passed filter
@alandekok alandekok added a commit that referenced this pull request Apr 1, 2016
@alandekok alandekok Print xlat types, too. Fixes #1574 d4f59c4
@alandekok alandekok closed this in 9275448 Apr 1, 2016
@alandekok alandekok added a commit that referenced this pull request Apr 1, 2016
@alandekok alandekok Print xlat types, too. Fixes #1574 dcf5952
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment