]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Concat input arguments into URL string
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 26 Jan 2018 02:12:57 +0000 (19:12 -0700)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 26 Jan 2018 02:12:57 +0000 (19:12 -0700)
src/modules/rlm_rest/rlm_rest.c

index 20c413435f1d83cb17abca2bf8416253ebf3134c..5b1c059ce463942e288d6a149296726ce26d67ce 100644 (file)
@@ -273,8 +273,13 @@ static xlat_action_t rest_xlat(UNUSED TALLOC_CTX *ctx, UNUSED fr_cursor_t *out,
        rlm_rest_xlat_rctx_t            *rctx;
        rlm_rest_section_t              *section;
 
-       if ((*in)->type != FR_TYPE_STRING) {
-               REDEBUG("rest xlat only accepts string inputs");
+       if (*in) {
+               REDEBUG("Got empty URL string");
+               return XLAT_ACTION_FAIL;
+       }
+
+       if (fr_value_box_list_concat(ctx, *in, in, FR_TYPE_STRING, true) < 0) {
+               REDEBUG("Failed concatenating arguments into URL string");
                return XLAT_ACTION_FAIL;
        }
        p = (*in)->vb_strvalue;