feat: saved SSH hosts per user, the way in sealed with AES-GCM under a server key kept beside the database
This commit is contained in:
1 parent
1f930e5aea
commit
94bf292494
10 files changed
+347
-7
No files matched your search
@@ -24,6 +24,10 @@ func (s *Server) handleSSHFSOpen(w http.ResponseWriter, r *http.Request) {
|
||||
writeJSON(w, proto.TaskResult{Error: "не указан хост"})
|
||||
return
|
||||
}
|
||||
if err := s.fillSaved(s.currentAdmin(r).ID, in.SSH); err != nil {
|
||||
writeJSON(w, proto.TaskResult{Error: err.Error()})
|
||||
return
|
||||
}
|
||||
t := in.SSH
|
||||
t.Host, t.User = strings.TrimSpace(t.Host), strings.TrimSpace(t.User)
|
||||
if t.Port == 0 {
|
||||
|
||||
Reference in new issue
Block a user