Browse Source

Merge branch 'master' of https://github.com/hestiacp/hestiacp

Kristan Kenney 6 years ago
parent
commit
a4ab386af2
4 changed files with 22 additions and 2 deletions
  1. 2 0
      CHANGELOG.md
  2. 7 0
      install/hst-install-debian.sh
  3. 7 0
      install/hst-install-ubuntu.sh
  4. 6 2
      web/add/package/index.php

+ 2 - 0
CHANGELOG.md

@@ -37,6 +37,8 @@ All notable changes to this project will be documented in this file.
 - Fixed cronjob issue with sftp jail due to missing user.
 - Fixed cronjob issue with sftp jail due to missing user.
 - Fixed issue #569 Remote backup hostname would reject ip addr without reverse dns (PTR record).
 - Fixed issue #569 Remote backup hostname would reject ip addr without reverse dns (PTR record).
 - Create a couple of writeable folders in each user home directory (#580).
 - Create a couple of writeable folders in each user home directory (#580).
+- Added gnupg2 check to prevent issues with pubkey installation.
+- Fixed nameserver validation on add new user packages.
 
 
 ## [1.0.5] - 2019-08-06 - Hotfix
 ## [1.0.5] - 2019-08-06 - Hotfix
 ### Bugfixes
 ### Bugfixes

+ 7 - 0
install/hst-install-debian.sh

@@ -343,6 +343,13 @@ if [ ! -e '/usr/lib/apt/methods/https' ]; then
     check_result $? "Can't install apt-transport-https"
     check_result $? "Can't install apt-transport-https"
 fi
 fi
 
 
+# Check if gnupg2 is installed
+if [ ! -e '/usr/bin/gnupg2' ]; then
+    echo "(*) Installing gnupg2..."
+    apt-get -y install gnupg2 >> $LOG
+    check_result $? "Can't install gnupg2"
+fi
+
 # Check if apparmor is installed
 # Check if apparmor is installed
 if [ $(dpkg-query -W -f='${Status}' apparmor 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
 if [ $(dpkg-query -W -f='${Status}' apparmor 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
     apparmor='no'
     apparmor='no'

+ 7 - 0
install/hst-install-ubuntu.sh

@@ -317,6 +317,13 @@ if [ ! -e '/usr/bin/apt-add-repository' ]; then
     check_result $? "Can't install software-properties-common"
     check_result $? "Can't install software-properties-common"
 fi
 fi
 
 
+# Check if gnupg2 is installed
+if [ ! -e '/usr/bin/gnupg2' ]; then
+    echo "(*) Installing gnupg2..."
+    apt-get -y install gnupg2 >> $LOG
+    check_result $? "Can't install gnupg2"
+fi
+
 # Check repository availability
 # Check repository availability
 wget --quiet "https://$GPG/deb_signing.key" -O /dev/null
 wget --quiet "https://$GPG/deb_signing.key" -O /dev/null
 check_result $? "Unable to connect to the Hestia APT repository"
 check_result $? "Unable to connect to the Hestia APT repository"

+ 6 - 2
web/add/package/index.php

@@ -43,8 +43,12 @@ if (!empty($_POST['ok'])) {
     if (!isset($_POST['v_backups'])) $errors[] = __('backups');
     if (!isset($_POST['v_backups'])) $errors[] = __('backups');
     if (!isset($_POST['v_disk_quota'])) $errors[] = __('quota');
     if (!isset($_POST['v_disk_quota'])) $errors[] = __('quota');
     if (!isset($_POST['v_bandwidth'])) $errors[] = __('bandwidth');
     if (!isset($_POST['v_bandwidth'])) $errors[] = __('bandwidth');
-    if (empty($_POST['v_ns1'])) $errors[] = __('ns1');
-    if (empty($_POST['v_ns2'])) $errors[] = __('ns2');
+    
+    // Check if name server entries are blank if DNS server is installed
+    if ((isset($_SESSION['DNS_SYSTEM'])) && (!empty($_SESSION['DNS_SYSTEM']))) {
+        if (empty($_POST['v_ns1'])) $errors[] = __('ns1');
+        if (empty($_POST['v_ns2'])) $errors[] = __('ns2');
+    }
     if (!empty($errors[0])) {
     if (!empty($errors[0])) {
         foreach ($errors as $i => $error) {
         foreach ($errors as $i => $error) {
             if ( $i == 0 ) {
             if ( $i == 0 ) {