]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-8131: [mod_voicemail] fix disallowed empty password set
authorNatanael Copa <ncopa@alpinelinux.org>
Mon, 7 Sep 2015 14:23:56 +0000 (16:23 +0200)
committerMichael Jerris <mike@jerris.com>
Tue, 15 Sep 2015 16:21:34 +0000 (12:21 -0400)
Prevent users to change password to an empty password when
allow-empty-password-auth is set to true.

src/mod/applications/mod_voicemail/mod_voicemail.c

index 892e27d6119cff93fe0b5e1000725cff6060f4a5..e1c51db27acc3685d3ba1193e32fa6f954f2e2a4 100644 (file)
@@ -2316,6 +2316,9 @@ static void voicemail_check_main(switch_core_session_t *session, vm_profile_t *p
                                                switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "VM-Domain", domain_name);
                                                switch_channel_event_set_data(channel, params);
                                                
+                                               if (zstr(buf) && !profile->allow_empty_password_auth) {
+                                                       fail = 1;
+                                               }
                                                if (switch_xml_locate_user("id", myid, domain_name, switch_channel_get_variable(channel, "network_addr"),
                                                                                                   &xx_domain_root, &xx_domain, &xx_user, NULL, params) == SWITCH_STATUS_SUCCESS) {
                                                        switch_xml_t x_result;