diff --git a/webroot/panel/account.php b/webroot/panel/account.php index 70bd098..c45602c 100644 --- a/webroot/panel/account.php +++ b/webroot/panel/account.php @@ -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; }