Skip to content

Commit

Permalink
Fixed issue where invalid github usernames generate invalid ssh keys.
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaswat975 committed Mar 4, 2024
1 parent a716b8a commit 7087b78
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 7087b78

Please sign in to comment.