Merge pull request 'allow ssh keys starting with "sk-"' (#8) from networkException/envs.net:master into master

Reviewed-on: https://git.envs.net/envs/site/pulls/8
This commit is contained in:
creme 2022-09-26 14:06:31 +00:00
commit 2c2dcf3869
1 changed files with 1 additions and 1 deletions

View File

@ -109,7 +109,7 @@ if (isset($_REQUEST["username"]) && isset($_REQUEST["email"])) {
$sshkey = trim($_REQUEST["sshkey"]);
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")
elseif (substr($sshkey, 0, 4) !== "ssh-" && substr($sshkey, 0, 3) !== "sk-" && substr($sshkey, 0, 5) !== "ecdsa")
$message .= "<li>ssh pubkey looks not correct.</li>\n";
else {
if ($name != "" && $email != "") {