aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/scripts/vmail.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/scripts/vmail.cgi')
-rw-r--r--contrib/scripts/vmail.cgi35
1 files changed, 1 insertions, 34 deletions
diff --git a/contrib/scripts/vmail.cgi b/contrib/scripts/vmail.cgi
index de51a4dc7..95bb9bb77 100644
--- a/contrib/scripts/vmail.cgi
+++ b/contrib/scripts/vmail.cgi
@@ -193,40 +193,7 @@ sub check_login($$)
}
}
close(VMAIL);
- return check_login_users();
-}
-
-sub check_login_users {
- my ($mbox, $context) = split(/\@/, param('mailbox'));
- my $pass = param('password');
- my ($found, $fullname) = (0, "");
- open VMAIL, "</etc/asterisk/users.conf";
- while (<VMAIL>) {
- chomp;
- if (m/\[(.*)\]/) {
- if ($1 eq $mbox) {
- $found = 1;
- } elsif ($found == 2) {
- close VMAIL;
- return (($fullname ? $fullname : "Extension $mbox in $context"), $context);
- } else {
- $found = 0;
- }
- } elsif ($found) {
- my ($var, $value) = split /\s*=\s*/, $_, 2;
- if ($var eq 'vmsecret' and $value eq $pass) {
- $found = 2;
- } elsif ($var eq 'fullname') {
- $fullname = $value;
- if ($found == 2) {
- close VMAIL;
- return ($fullname, $context);
- }
- }
- }
- }
- close VMAIL;
- return ("", "");
+ return ("", $category);
}
sub validmailbox($$$$)