Skip to content
Snippets Groups Projects
Commit 341d2b14 authored by tbrehm's avatar tbrehm
Browse files

Fixed: FS#913 - Adding a new database user and table through the webgui and...

Fixed: FS#913 - Adding a new database user and table through the webgui and leaving the allowed IP fields empty for 
parent 945397f4
No related branches found
No related tags found
2 merge requests!46Master,!21Master
......@@ -85,7 +85,9 @@ class mysql_clientdb_plugin {
// 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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment