tbrehm
2009-10-01 341d2b14f712d8d687c56dd145383831f093c490
Fixed: FS#913 - Adding a new database user and table through the webgui and leaving the allowed IP fields empty for 
1 files modified
4 ■■■ changed files
server/plugins-available/mysql_clientdb_plugin.inc.php 4 ●●● patch | view | raw | blame | history
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)