about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorkneezle <kneezle@tilde.team>2021-01-19 21:11:00 +0000
committerkneezle <kneezle@tilde.team>2021-01-19 21:11:00 +0000
commit476b911305d29b6f59d47b31f23b1aae3ee8ee73 (patch)
tree04e9c8cd7090ba4762657f2ac586f8cd8ed03b17
parentf3fd703f0289266a2b90eb3fa766c30a34c58c83 (diff)
downloadsite-476b911305d29b6f59d47b31f23b1aae3ee8ee73.tar.gz
Added ssh key validation
-rwxr-xr-xhtml/submit.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/html/submit.php b/html/submit.php
index 3be3372..e0c6435 100755
--- a/html/submit.php
+++ b/html/submit.php
@@ -105,6 +105,11 @@ if (isset($_REQUEST["username"]) && isset($_REQUEST["email"])) {
         $message .= "<li>ssh key required: please create one and submit the public key</li>";
     }
 
+    if (mb_substr($_REQUEST["sshkey"], 0, 4) !== "ssh-") {
+                $message .= "<li>PUBLIC ssh key required: please create one and submit the public key</li>";
+                    }
+    }
+
 
     if ($message == "") { // no validation errors