From 341d2b14f712d8d687c56dd145383831f093c490 Mon Sep 17 00:00:00 2001 From: tbrehm <t.brehm@ispconfig.org> Date: Thu, 01 Oct 2009 10:41:57 -0400 Subject: [PATCH] Fixed: FS#913 - Adding a new database user and table through the webgui and leaving the allowed IP fields empty for --- server/plugins-available/mysql_clientdb_plugin.inc.php | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/server/plugins-available/mysql_clientdb_plugin.inc.php b/server/plugins-available/mysql_clientdb_plugin.inc.php index 493d80f..a1bb4fa 100644 --- a/server/plugins-available/mysql_clientdb_plugin.inc.php +++ b/server/plugins-available/mysql_clientdb_plugin.inc.php @@ -85,7 +85,9 @@ // check if entry is valid ip address $valid = true; - if(preg_match("/^[0-9]{1,3}(\.)[0-9]{1,3}(\.)[0-9]{1,3}(\.)[0-9]{1,3}$/", $db_host)) { + if($db_host == "%") { + $valid = true; + } elseif(preg_match("/^[0-9]{1,3}(\.)[0-9]{1,3}(\.)[0-9]{1,3}(\.)[0-9]{1,3}$/", $db_host)) { $groups = explode(".", $db_host); foreach($groups as $group){ if($group<0 OR $group>255) -- Gitblit v1.9.1