Skip to content

Commit a29ab98

Browse files
committed
Fixed nameserver validation on add new user packages
1 parent 5ea86c0 commit a29ab98

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ All notable changes to this project will be documented in this file.
3838
- Fixed issue #569 Remote backup hostname would reject ip addr without reverse dns (PTR record).
3939
- Create a couple of writeable folders in each user home directory (#580).
4040
- Added gnupg2 check to prevent issues with pubkey installation.
41+
- Fixed nameserver validation on add new user packages.
4142

4243
## [1.0.5] - 2019-08-06 - Hotfix
4344
### Bugfixes

web/add/package/index.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,12 @@
4343
if (!isset($_POST['v_backups'])) $errors[] = __('backups');
4444
if (!isset($_POST['v_disk_quota'])) $errors[] = __('quota');
4545
if (!isset($_POST['v_bandwidth'])) $errors[] = __('bandwidth');
46-
if (empty($_POST['v_ns1'])) $errors[] = __('ns1');
47-
if (empty($_POST['v_ns2'])) $errors[] = __('ns2');
46+
47+
// Check if name server entries are blank if DNS server is installed
48+
if ((isset($_SESSION['DNS_SYSTEM'])) && (!empty($_SESSION['DNS_SYSTEM']))) {
49+
if (empty($_POST['v_ns1'])) $errors[] = __('ns1');
50+
if (empty($_POST['v_ns2'])) $errors[] = __('ns2');
51+
}
4852
if (!empty($errors[0])) {
4953
foreach ($errors as $i => $error) {
5054
if ( $i == 0 ) {

0 commit comments

Comments
 (0)