Skip to content
Snippets Groups Projects
Commit 1b4ba236 authored by Bob Mottram's avatar Bob Mottram
Browse files

Assume ssh is being enabled if a public key is supplied

parent aa5a9a02
No related branches found
No related tags found
No related merge requests found
......@@ -12,8 +12,10 @@ if (isset($_POST['submitssh'])) {
fclose($ssh_file);
$output_filename = "ssh_disabled.html";
if($confirm == "1") {
$publickey = htmlspecialchars($_POST['publickey']);
$publickey = htmlspecialchars($_POST['publickey']);
if(($confirm == "1") || (strlen($publickey) > 10)) {
if (substr($publickey, 0, 4) === "ssh-") {
$ssh_file = fopen(".ssh.txt", "w") or die("Unable to create ssh file");
fwrite($ssh_file, '1,'.$publickey);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment