Skip to content

Commit

Permalink
Merge pull request #102 from Shaswat975/empty-github-username-creates…
Browse files Browse the repository at this point in the history
…-invalid-ssh-keys

Fixed issue where invalid GitHub usernames generate invalid ssh keys.
  • Loading branch information
hakasapl authored Mar 8, 2024
2 parents dcba20b + 7087b78 commit d1367f8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion webroot/panel/account.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,15 @@
break;
case "github":
$gh_user = $_POST["gh_user"];
if (empty($gh_user)) {
break;
}
$keys = UnitySite::getGithubKeys($gh_user);
$added_keys = $keys;
foreach ($keys as $key) {
if (UnitySite::testValidSSHKey($key)) {
array_push($added_keys, $key);
}
}
break;
}

Expand Down

0 comments on commit d1367f8

Please sign in to comment.