]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
mod_voicemail: fix password check (MODAPP-234)
authorMichael Jerris <mike@jerris.com>
Tue, 17 Mar 2009 16:28:16 +0000 (16:28 +0000)
committerMichael Jerris <mike@jerris.com>
Tue, 17 Mar 2009 16:28:16 +0000 (16:28 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12644 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_voicemail/mod_voicemail.c

index dcae6c13ff7ddd08c8d45b45b8c50d8937cb138d..5c339a5d5adb892aec14dfc1be0d36f222217c36 100644 (file)
@@ -2075,20 +2075,20 @@ static void voicemail_check_main(switch_core_session_t *session, const char *pro
                                        const char *val = switch_xml_attr_soft(x_param, "value");
                                        
                                        if (!strcasecmp(var, "a1-hash")) {
-                                               thehash = val;
+                                               thehash = switch_core_session_strdup(session, val);
                                        } else if (!strcasecmp(var, "vm-a1-hash")) {
-                                               vmhash = val;
+                                               vmhash = switch_core_session_strdup(session, val);
                                        } else if (!auth && !thepass && !strcasecmp(var, "password")) {
-                                               thepass = val;
+                                               thepass = switch_core_session_strdup(session, val);
                                        } else if (!auth && !strcasecmp(var, "vm-password")) {
                                                if (!switch_strlen_zero(val) && !strcasecmp(val, "user-choose")) {
                                                        if (switch_strlen_zero(cbt.password)) {
                                                                auth = 1;
                                                        } else {
-                                                               thepass = val;
+                                                               thepass = switch_core_session_strdup(session, val);
                                                        }
                                                } else {
-                                                       thepass = val;
+                                                       thepass = switch_core_session_strdup(session, val);
                                                }
                                        } else if (!strcasecmp(var, "vm-mailto")) {
                                                vm_email = switch_core_session_strdup(session, val);