Commit 54f1581b authored by mcramer's avatar mcramer
Browse files

Fixed: FS#2314 - Reseller creation in remote API does not work properly (id_rsa and ssh_rsa)

parent 4e18bd42
......@@ -2651,6 +2651,12 @@ class remoting {
/* copied from the client_edit php */
exec('ssh-keygen -t rsa -C '.$username.'-rsa-key-'.time().' -f /tmp/id_rsa -N ""');
$app->db->query("UPDATE client SET created_at = ".time().", id_rsa = '".$app->db->quote(@file_get_contents('/tmp/id_rsa'))."', ssh_rsa = '".$app->db->quote(@file_get_contents('/tmp/'))."' WHERE client_id = ".$this->id);
exec('rm -f /tmp/id_rsa /tmp/');
//* Save changes to Datalog
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment