mirror of
https://github.com/operasoftware/ssh-key-authority.git
synced 2026-01-06 04:40:19 -06:00
Fix exception handling for bad data in server-to-server access request
This commit is contained in:
@@ -138,12 +138,10 @@ if(isset($_POST['sync']) && ($server_admin || $active_user->admin)) {
|
||||
case 'server_account':
|
||||
try {
|
||||
$server_remote = $server_dir->get_server_by_hostname($_POST['hostname_remote']);
|
||||
} catch(ServerNotFoundException $e) {
|
||||
$content = new PageSection('server_not_found');
|
||||
}
|
||||
try {
|
||||
$from = $server_remote->get_account_by_name($_POST['account_remote']);
|
||||
$from_description = " from {$from->name}@{$server_remote->hostname}";
|
||||
} catch(ServerNotFoundException $e) {
|
||||
$content = new PageSection('server_not_found');
|
||||
} catch(ServerAccountNotFoundException $e) {
|
||||
$content = new PageSection('server_account_not_found');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user