Changes for 2.1.0pl1:
[BackupPC.git] / lib / BackupPC / CGI / Lib.pm
index 280ff53..9d89b0d 100644 (file)
@@ -102,8 +102,10 @@ sub NewRequest
        $Lang   = $bpc->Lang();
        $ConfigMTime = $bpc->ConfigMTime();
     } elsif ( $bpc->ConfigMTime() != $ConfigMTime ) {
-        $bpc->ServerMesg("log Re-read config file because mtime changed");
-        $bpc->ServerMesg("server reload");
+       $bpc->ConfigRead();
+       %Conf   = $bpc->Conf();
+       $Lang   = $bpc->Lang();
+       $ConfigMTime = $bpc->ConfigMTime();
     }
 
     #
@@ -154,6 +156,15 @@ EOF
               {map {$_, 1} split(",", $Hosts->{$host}{moreUsers}) }
        }
     }
+
+    #
+    # Untaint the host name
+    #
+    if ( $In{host} =~ /^([\w.\s-]+)$/ ) {
+       $In{host} = $1;
+    } else {
+       delete($In{host});
+    }
 }
 
 sub timeStamp2