aboutsummaryrefslogtreecommitdiffstats
path: root/main/freeswitch/0001-FS-8131-mod_voicemail-fix-disallowed-empty-password-.patch
blob: 328d5edbecd7faf4ff44a416b2270ccfbdb4611a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From 7aba5d52ee609e63ede7e76ab955179e9c61244d Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Mon, 7 Sep 2015 16:23:56 +0200
Subject: [PATCH] FS-8131: [mod_voicemail] fix disallowed empty password set

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 | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/mod/applications/mod_voicemail/mod_voicemail.c b/src/mod/applications/mod_voicemail/mod_voicemail.c
index da6180a..6300211 100644
--- a/src/mod/applications/mod_voicemail/mod_voicemail.c
+++ b/src/mod/applications/mod_voicemail/mod_voicemail.c
@@ -2305,6 +2305,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;
-- 
2.5.1