signup: update check for sshpubkey

This commit is contained in:
creme 2022-05-29 10:34:14 +02:00
parent afd897d428
commit c4afc6dc43
Signed by: creme
GPG Key ID: C147C3B7FBDF08D0
1 changed files with 4 additions and 2 deletions

View File

@ -103,8 +103,10 @@ if (isset($_REQUEST["username"]) && isset($_REQUEST["email"])) {
$sshkey = trim($_REQUEST["sshkey"]);
if ($sshkey == "" || substr($sshkey, 0, 4) !== "ssh-")
$message .= "<li>ssh key required: please submit the public key.</li>\n";
if ($sshkey == "")
$message .= "<li>ssh pubkey required: please submit the public key.</li>\n";
elseif (substr($sshkey, 0, 4) !== "ssh-" && substr($sshkey, 0, 5) !== "ecdsa")
$message .= "<li>ssh pubkey looks not correct.</li>\n";
else {
if ($name != "" && $email != "") {
if (forbidden_sshkey($sshkey)) {