From 8216c5ee690f97b9f8f8ac967dac5c5f3745a00f Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Tue, 12 Apr 2016 06:18:24 -0400
Subject: [PATCH] Fixed: Issue #3820 v3.1 Shell user wrong default Base Dir in GUI results to corrupt shell user home directory creation.

---
 server/plugins-available/network_settings_plugin.inc.php |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/plugins-available/network_settings_plugin.inc.php b/server/plugins-available/network_settings_plugin.inc.php
index 13dbf3c..5ce6f93 100644
--- a/server/plugins-available/network_settings_plugin.inc.php
+++ b/server/plugins-available/network_settings_plugin.inc.php
@@ -110,7 +110,7 @@
 						/*
 						 * don't insert the main-ip again!
 						 */
-						if ($rec['ip_address'] != $server_config['ip_address'])
+						if ($rec['ip_address'] != $server_config['ip_address'] && filter_var($rec['ip_address'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4))
 						{
 							$ip_records[$n] = array(
 								'id' => $n,
@@ -188,7 +188,7 @@
 						/*
 						 * don't insert the main-ip again!
 						 */
-						if ($rec['ip_address'] != $server_config['ip_address'])
+						if ($rec['ip_address'] != $server_config['ip_address'] && filter_var($rec['ip_address'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4))
 						{
 							$ip_records[$n] = array(
 								'id' => $n,

--
Gitblit v1.9.1