Skip to content

Commit

Permalink
Don't escape quotes when passing strings to Python
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed May 4, 2016
1 parent c0db0c2 commit bafc20f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/modules/rlm_python/rlm_python.c
Expand Up @@ -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);

Expand Down

0 comments on commit bafc20f

Please sign in to comment.