]> 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>
Sun, 1 Mar 2009 18:12:16 +0000 (10:12 -0800)
install.php

index 18fc362b62e6e9dce09ffe6779824538f23da1cb..18a10664dd0604c605659aadc4224bc02bd9c2c0 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);