Skip to content

Commit 45e85f7

Browse files
committed
Prevent v-delete-mail-domain-webmail being called without imap enabled
1 parent 86d6aa1 commit 45e85f7

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

web/add/mail/index.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,13 @@
9595
}
9696
}
9797

98-
if (empty($_POST['v_webmail'])) {
99-
if (empty($_SESSION['error_msg'])) {
100-
exec (HESTIA_CMD."v-delete-mail-domain-webmail ".$user." ".$v_domain." yes", $output, $return_var);
101-
check_return_code($return_var,$output);
102-
unset($output);
98+
if (!empty($_SESSION['IMAP_SYSTEM'])) {
99+
if (empty($_POST['v_webmail'])) {
100+
if (empty($_SESSION['error_msg'])) {
101+
exec (HESTIA_CMD."v-delete-mail-domain-webmail ".$user." ".$v_domain." yes", $output, $return_var);
102+
check_return_code($return_var,$output);
103+
unset($output);
104+
}
103105
}
104106
}
105107

0 commit comments

Comments
 (0)