]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
url decode these variables just incase
authorBrian West <brian@freeswitch.org>
Wed, 24 Aug 2011 01:51:01 +0000 (20:51 -0500)
committerBrian West <brian@freeswitch.org>
Wed, 24 Aug 2011 01:51:01 +0000 (20:51 -0500)
src/mod/applications/mod_spandsp/mod_spandsp_fax.c

index 34562faaddf4a8a51453bebd7f2c99f18a967eb4..0504b0b082c89d8df245dadb4b8cc2d1b5d95835 100644 (file)
@@ -997,13 +997,25 @@ static pvt_t *pvt_init(switch_core_session_t *session, mod_spandsp_fax_applicati
        }
 
        if ((tmp = switch_channel_get_variable(channel, "fax_ident"))) {
-               pvt->ident = switch_core_session_strdup(session, tmp);
+        char *data = NULL;
+
+        data = strdup(tmp);
+        switch_url_decode(data);
+               pvt->ident = switch_core_session_strdup(session, data);
+
+        switch_safe_free(data);
        } else {
                pvt->ident = switch_core_session_strdup(session, globals.ident);
        }
 
        if ((tmp = switch_channel_get_variable(channel, "fax_header"))) {
-               pvt->header = switch_core_session_strdup(session, tmp);
+        char *data = NULL;
+
+        data = strdup(tmp);
+        switch_url_decode(data);
+        pvt->header = switch_core_session_strdup(session, data);
+
+        switch_safe_free(data);
        } else {
                pvt->header = switch_core_session_strdup(session, globals.header);
        }