hub: use Hungarian word passphrases for retrieval passwords
Replace 64-char hex retrieval passwords with 5-word Hungarian passphrases (e.g. áldás-plazmid-palánta-süvítve-pócgém) for better UX in disaster recovery scenarios. Embed 29K+ word list via go:embed. API keys remain hex. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -367,7 +367,7 @@ func (s *Server) handleConfigCreate(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
// Generate credentials
|
||||
retrievalPassword, err := configgen.RandomHex(32)
|
||||
retrievalPassword, err := configgen.RandomPassphrase(5)
|
||||
if err != nil {
|
||||
http.Error(w, "Internal error", http.StatusInternalServerError)
|
||||
return
|
||||
@@ -493,7 +493,7 @@ func (s *Server) handleConfigPreview(w http.ResponseWriter, r *http.Request, cus
|
||||
|
||||
// handleConfigRegenPassword regenerates the retrieval password.
|
||||
func (s *Server) handleConfigRegenPassword(w http.ResponseWriter, r *http.Request, customerID string) {
|
||||
newPassword, err := configgen.RandomHex(32)
|
||||
newPassword, err := configgen.RandomPassphrase(5)
|
||||
if err != nil {
|
||||
http.Error(w, "Internal error", http.StatusInternalServerError)
|
||||
return
|
||||
@@ -633,7 +633,7 @@ func (s *Server) handleCreateConfigFromReport(w http.ResponseWriter, r *http.Req
|
||||
}
|
||||
|
||||
// Generate credentials
|
||||
retrievalPassword, _ := configgen.RandomHex(32)
|
||||
retrievalPassword, _ := configgen.RandomPassphrase(5)
|
||||
apiKey, _ := configgen.RandomHex(32)
|
||||
|
||||
cfg := &store.CustomerConfig{
|
||||
|
||||
Reference in New Issue
Block a user