]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Don't escape quotes when passing strings to Python
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 4 May 2016 22:43:47 +0000 (15:43 -0700)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 4 May 2016 22:43:47 +0000 (15:43 -0700)
src/modules/rlm_python/rlm_python.c

index ab82a72107d6a2229ad292934a782dae7e9848d6..e263a9b41fd3d4a6c26f98823d50a0d35feee8a2 100644 (file)
@@ -354,9 +354,10 @@ static int mod_populate_vptuple(PyObject *pPair, VALUE_PAIR *vp)
 
        PyTuple_SET_ITEM(pPair, 0, pStr);
 
-       vp_prints_value(buf, sizeof(buf), vp, '"');
+       vp_prints_value(buf, sizeof(buf), vp, '\0');    /* Python doesn't need any escaping */
 
-       if ((pStr = PyString_FromString(buf)) == NULL) return -1;
+       pStr = PyString_FromString(buf);
+       if (pStr == NULL) return -1;
 
        PyTuple_SET_ITEM(pPair, 1, pStr);