]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
check posted parameters
authorEvan Prodromou <evan@controlyourself.ca>
Sun, 1 Mar 2009 18:12:16 +0000 (10:12 -0800)
committerEvan Prodromou <evan@controlyourself.ca>
Wed, 4 Mar 2009 13:42:06 +0000 (05:42 -0800)
install.php

index 3d76dace14d36835dd5fb86a3cf013af14339d38..29d9094175cfa37d9afd20cc18aa803baeeefa1d 100644 (file)
@@ -130,6 +130,36 @@ function handlePost()
     $password = $_POST['password'];
     $sitename = $_POST['sitename'];
 
+    if (empty($host)) {
+        updateStatus("No hostname specified.", true);
+        showForm();
+        return;
+    }
+
+    if (empty($database)) {
+        updateStatus("No database specified.", true);
+        showForm();
+        return;
+    }
+
+    if (empty($username)) {
+        updateStatus("No username specified.", true);
+        showForm();
+        return;
+    }
+
+    if (empty($password)) {
+        updateStatus("No password specified.", true);
+        showForm();
+        return;
+    }
+
+    if (empty($sitename)) {
+        updateStatus("No sitename specified.", true);
+        showForm();
+        return;
+    }
+
     updateStatus("Starting installation...");
     updateStatus("Checking database...");
     $conn = mysql_connect($host, $username, $password);