Bug in rlm_rest when trying to send JSON structure of 1024 bytes #768

Closed
qnet-herwin opened this Issue Aug 28, 2014 · 4 comments

Projects

None yet

2 participants

@qnet-herwin
Contributor

When using rlm_rest with body = json and the resulting data structure is 1024 bytes long (and probably multiples of 1024 as well, though we haven't tested that), the resulting json structure misses its final }. This is most likely an off-by-one somewhere in the code.

Easiest way to reproduce is probably setting up an SSID that uses MAC-based authentication, then add some exactly the right amount of garbage to the request before calling the rest module (may take a few tries).

@arr2036
Member
arr2036 commented Aug 28, 2014

Could you try current v3.0.x HEAD.

@qnet-herwin
Contributor

Tried it with a JSON-body of 1024 bytes at commit 04abc06, the fix seems to work. Haven't tested it with the master-branch, I wouldn't be surprised if that had the same problem.

@arr2036
Member
arr2036 commented Aug 28, 2014

Almost certainly, just wanted to make sure the fix was correct before cherry-pick across. Thanks for testing.

@arr2036 arr2036 closed this Aug 28, 2014
@qnet-herwin
Contributor

Just tested it with master at commit c5b43ae: that works too (and it failed previously)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment