From: aland Date: Mon, 18 Jun 2007 12:13:20 +0000 (+0000) Subject: Strip embedded LF's and CR's X-Git-Tag: release_2_0_0_pre2~217 X-Git-Url: http://www.project-moonshot.org/gitweb/?a=commitdiff_plain;h=9e8ba35c864e788d60f8bbc01ff63929333dc04f;p=freeradius.git Strip embedded LF's and CR's --- diff --git a/src/modules/rlm_exec/rlm_exec.c b/src/modules/rlm_exec/rlm_exec.c index adfecde..9cc02fb 100644 --- a/src/modules/rlm_exec/rlm_exec.c +++ b/src/modules/rlm_exec/rlm_exec.c @@ -121,6 +121,7 @@ static int exec_xlat(void *instance, REQUEST *request, int result; rlm_exec_t *inst = instance; VALUE_PAIR **input_pairs; + char *p; input_pairs = decode_string(request, inst->input); if (!input_pairs) { @@ -142,6 +143,10 @@ static int exec_xlat(void *instance, REQUEST *request, return 0; } + for (p = out; *p != '\0'; p++) { + if (*p < ' ') *p = ' '; + } + return strlen(out); }