mirror of
https://github.com/lordmathis/llamactl.git
synced 2025-12-22 17:14:22 +00:00
Fix double dash in generated keys
This commit is contained in:
@@ -121,7 +121,7 @@ func (h *Handler) CreateKey() http.HandlerFunc {
|
||||
}
|
||||
|
||||
// Generate plain-text key
|
||||
plainTextKey, err := auth.GenerateKey("llamactl-")
|
||||
plainTextKey, err := auth.GenerateKey("llamactl")
|
||||
if err != nil {
|
||||
writeError(w, http.StatusInternalServerError, "key_generation_failed", "Failed to generate API key")
|
||||
return
|
||||
|
||||
@@ -41,7 +41,7 @@ func NewAPIAuthMiddleware(authCfg config.AuthConfig, authStore database.AuthStor
|
||||
const banner = "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
|
||||
if authCfg.RequireManagementAuth && len(authCfg.ManagementKeys) == 0 {
|
||||
key, err := auth.GenerateKey("llamactl-mgmt-")
|
||||
key, err := auth.GenerateKey("llamactl-mgmt")
|
||||
if err != nil {
|
||||
log.Printf("Warning: Failed to generate management key: %v", err)
|
||||
// Fallback to PID-based key for safety
|
||||
|
||||
Reference in New Issue
Block a user