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:
redtea committed 2026-10-15 22:18:27 +03:00
1 parent 1f930e5aea
commit 94bf292494
10 files changed
+347 -7

No files matched your search

+4
View File
@@ -139,6 +139,10 @@ func (s *Server) handleFSShip(w http.ResponseWriter, r *http.Request) {
return
}
where := ""
if err := s.fillSaved(s.currentAdmin(r).ID, q.SSH); err != nil {
writeJSON(w, proto.TaskResult{Error: err.Error()})
return
}
if q.SSH != nil {
t := q.SSH
t.Host, t.User = strings.TrimSpace(t.Host), strings.TrimSpace(t.User)