fix: remove CLI credential timeout and password complexity limits (#20)

This commit is contained in:
Meng Meng
2026-08-14 22:46:37 +08:00
committed by GitHub
parent fcf57ffec9
commit 540a967f96
5 changed files with 82 additions and 21 deletions
+1 -1
View File
@@ -506,7 +506,7 @@ func (s *Server) handlePasswordChange(w http.ResponseWriter, r *http.Request) {
switch {
case errors.Is(err, auth.ErrInvalidCredentials):
writeError(w, http.StatusUnauthorized, "invalid_credentials", "current password is incorrect")
case strings.Contains(err.Error(), "between 6 and 1024"):
case errors.Is(err, auth.ErrEmptyPassword):
writeError(w, http.StatusBadRequest, "weak_password", err.Error())
case strings.Contains(err.Error(), "must differ"):
writeError(w, http.StatusBadRequest, "password_reused", err.Error())