From 476b911305d29b6f59d47b31f23b1aae3ee8ee73 Mon Sep 17 00:00:00 2001 From: kneezle Date: Tue, 19 Jan 2021 21:11:00 +0000 Subject: Added ssh key validation --- html/submit.php | 5 +++++ 1 file changed, 5 insertions(+) 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 .= "
  • ssh key required: please create one and submit the public key
  • "; } + if (mb_substr($_REQUEST["sshkey"], 0, 4) !== "ssh-") { + $message .= "
  • PUBLIC ssh key required: please create one and submit the public key
  • "; + } + } + if ($message == "") { // no validation errors -- cgit 1.4.1-2-gfad0