freeradius/freeradius-perl-string-escaping.patch
2014-05-24 16:50:57 +03:00

29 lines
1.2 KiB
Diff

commit ff8b26e0cdad5d2579dcf64edbe2fab2b10aecd4
Author: Alan T. DeKok <aland@freeradius.org>
Date: Wed May 14 13:32:42 2014 -0400
Fix typo. Closes #635
diff --git a/src/modules/rlm_perl/rlm_perl.c b/src/modules/rlm_perl/rlm_perl.c
index 65cd971..a45daec 100644
--- a/src/modules/rlm_perl/rlm_perl.c
+++ b/src/modules/rlm_perl/rlm_perl.c
@@ -617,7 +617,7 @@ static void perl_store_vps(TALLOC_CTX *ctx, REQUEST *request, VALUE_PAIR *vps, H
for (vp = fr_cursor_first(&cursor);
vp;
vp = fr_cursor_next(&cursor)) {
- if (vp->da->type != PW_TYPE_INVALID) {
+ if (vp->da->type != PW_TYPE_STRING) {
len = vp_prints_value(buffer, sizeof(buffer), vp, 0);
av_push(av, newSVpv(buffer, truncate_len(len, sizeof(buffer))));
RDEBUG("<-- %s = %s", vp->da->name, buffer);
@@ -634,7 +634,7 @@ static void perl_store_vps(TALLOC_CTX *ctx, REQUEST *request, VALUE_PAIR *vps, H
*/
} else if (sublist) {
- if (sublist->da->type != PW_TYPE_INVALID) {
+ if (sublist->da->type != PW_TYPE_STRING) {
len = vp_prints_value(buffer, sizeof(buffer), sublist, 0);
(void)hv_store(rad_hv, name, strlen(name), newSVpv(buffer, truncate_len(len, sizeof(buffer))), 0);
RDEBUG("<-- %s = %s", sublist->da->name, buffer);