Skip to content

Commit caf3f72

Browse files
authored
Merge pull request hestiacp#1248 from hestiacp/fix/2020-10-issues_with_adding_keys
Added functionality whe ssh key is missing the last part:
2 parents 6a43178 + 2fed8d6 commit caf3f72

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

web/add/key/index.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
$v_key_parts = explode(' ',$_POST['v_key']);
3333
$key_id = trim($v_key_parts[2]);
3434
if($v_key_parts[2] == ''){
35-
$_SESSION['error_msg'] = _('SSH KEY is invalid');
35+
$v_key_parts[2] = md5(time());
36+
$_POST['v_key'] .= ' '.$v_key_parts[2];
3637
}
3738

3839
//for deleting / revoking key the last part user@domain is used therefore needs to be unique

0 commit comments

Comments
 (0)