FreeRADIUS/freeradius-server — pull request #186 by candlerb (2013-02-08 15:01:50+00:00)
Title: redis escaping and TRIM

Patch against 2.x.x, as described at but now rebased to avoid conflict with 043d5de9

Two commits:

(1) Change redis expansion to split on space, expand each substring separately, and then pass as an array to redisCommandArgv. This allows for values like %{User-Name} to contain spaces.

Note: the released version of 2.2.0 was unable to cope with strings containing spaces. As of commit 6e8e5ab2 the space would have been replaced with =20, but with this commit, spaces are inserted as spaces. So it's a behaviour change, but not against any previous release.

(2) Fix the rlm_rediswho "trim" functionality, which was broken because it was checking the returned value from the redis insert after redis_finish_query, and thus always seeing zero.