Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
......@@ -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/id_rsa.pub'))."' WHERE client_id = ".$this->id);
exec('rm -f /tmp/id_rsa /tmp/id_rsa.pub');
//$app->uses('tform');
//* Save changes to Datalog
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment