diff --git a/webroot/panel/account.php b/webroot/panel/account.php index f97a84b6..b31fdaee 100644 --- a/webroot/panel/account.php +++ b/webroot/panel/account.php @@ -32,7 +32,13 @@ $validKeys = array_filter($keys, "testValidSSHKey"); $USER->setSSHKeys(array_merge($USER->getSSHKeys(), $validKeys)); if (count($keys) != count($validKeys)) { - UnityHTTPD::alert("invalid SSH key"); + UnityHTTPD::badRequest( + "one more more invalid SSH keys were not added", + data: [ + "keys_valid_added" => $validKeys, + "keys_invalid_not_added" => array_diff($keys, $validKeys), + ], + ); } } break; diff --git a/webroot/panel/modal/new_key.php b/webroot/panel/modal/new_key.php index c8909fe0..4499aae3 100644 --- a/webroot/panel/modal/new_key.php +++ b/webroot/panel/modal/new_key.php @@ -37,8 +37,8 @@