mirror of https://git.envs.net/envs/site.git
signup: update check for sshpubkey
This commit is contained in:
parent
afd897d428
commit
c4afc6dc43
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue