allow dot in user, web side
authorkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Sun, 29 Jun 2008 09:56:14 +0000 (09:56 +0000)
committerkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Sun, 29 Jun 2008 09:56:14 +0000 (09:56 +0000)
git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@161 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33

www/inc/machine/session.php

index d9ebd82..8e6d988 100644 (file)
@@ -289,7 +289,7 @@ function getUserAclXml($user)
 {
        //sanity check
        $user=trim($user);
-       if(ereg("^[A-Za-z0-9_]+$",$user)===false){
+       if(ereg("^[A-Za-z0-9_\\.]+$",$user)===false){
                header("X-MagicSmoke-Status: SyntaxError");
                die(tr("invalid user name"));
        }
@@ -368,7 +368,7 @@ function getUserHostsXml($user)
 {
        //sanity check
        $user=trim($user);
-       if(ereg("^[A-Za-z0-9_]+$",$user)===false){
+       if(ereg("^[A-Za-z0-9_\\.]+$",$user)===false){
                header("X-MagicSmoke-Status: SyntaxError");
                die(tr("invalid user name"));
        }
@@ -490,7 +490,7 @@ function addUserXml($txt)
        $root=$dom->createElement("Users");
        for($i=0;$i<count($usr);$i++){
                //syntax check
-               if(ereg("^[A-Za-z0-9_]+$",$usr[$i]["name"])===false)continue;
+               if(ereg("^[A-Za-z0-9_\\.]+$",$usr[$i]["name"])===false)continue;
                //existance check
                $db->beginTransaction();
                $res=$db->select("users","uname","uname='".$usr[$i]["name"]."'");