about summary refs log tree commit diff stats
path: root/html/submit.php
diff options
context:
space:
mode:
Diffstat (limited to 'html/submit.php')
-rwxr-xr-xhtml/submit.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/html/submit.php b/html/submit.php
index 1b297e8..fee7461 100755
--- a/html/submit.php
+++ b/html/submit.php
@@ -101,7 +101,7 @@ if (isset($_REQUEST["username"]) && isset($_REQUEST["email"])) {
             $message .= "<li>invalid email address. did you mean:  " . htmlspecialchars($result["email"]) . "</li>";
     }
 
-    if ($_REQUEST["sshkey"] == "") {
+    if ($_REQUEST["sshkey"] == "" || (substr($_REQUEST["sshkey"], 0, 4) !== "ssh-" && substr($_REQUEST["sshkey"], 0, 3) !== "sk-" && substr($_REQUEST["sshkey"], 0, 5) !== "ecdsa")) {
         $message .= "<li>ssh key required: please create one and submit the public key</li>";
     }
 
@@ -109,7 +109,7 @@ if (isset($_REQUEST["username"]) && isset($_REQUEST["email"])) {
     if ($message == "") { // no validation errors
 
 	    // remember:
-	    $username = $_REQUEST["username"];
+	    $username = strtolower($_REQUEST["username"]);
 	    $email = $_REQUEST["email"];
 	    $interest = $_REQUEST["interest"];
 	    $sshkey = $_REQUEST["sshkey"];