]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 227510: The shadowdb parameter wasn't getting detainted before using it to create...
authorjustdave%syndicomm.com <>
Sun, 18 Jan 2004 10:44:54 +0000 (10:44 +0000)
committerjustdave%syndicomm.com <>
Sun, 18 Jan 2004 10:44:54 +0000 (10:44 +0000)
r= myk, a= justdave

defparams.pl

index 4332b0ecabe3f842040145a85b84fdbe0d708027..106da06879856db71abf13dd2e9fa94a6b216ac8 100644 (file)
@@ -93,6 +93,12 @@ sub check_numeric {
 sub check_shadowdb {
     my ($value) = (@_);
     $value = trim($value);
+    if ($value =~ /^([A-Za-z0-9_]+)$/) {
+        $value = $1;
+    }
+    else {
+        return "Invalid database name.  Database names must include only alphanumeric characters and underscores.";
+    }
     if ($value eq "") {
         return "";
     }