Skip to content

Commit 341d2b1

Browse files
committed
Fixed: FS#913 - Adding a new database user and table through the webgui and leaving the allowed IP fields empty for
1 parent 945397f commit 341d2b1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

server/plugins-available/mysql_clientdb_plugin.inc.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ function process_host_list($action, $database_name, $database_user, $database_pa
8585

8686
// check if entry is valid ip address
8787
$valid = true;
88-
if(preg_match("/^[0-9]{1,3}(\.)[0-9]{1,3}(\.)[0-9]{1,3}(\.)[0-9]{1,3}$/", $db_host)) {
88+
if($db_host == "%") {
89+
$valid = true;
90+
} elseif(preg_match("/^[0-9]{1,3}(\.)[0-9]{1,3}(\.)[0-9]{1,3}(\.)[0-9]{1,3}$/", $db_host)) {
8991
$groups = explode(".", $db_host);
9092
foreach($groups as $group){
9193
if($group<0 OR $group>255)

0 commit comments

Comments
 (0)