diff --git a/pkg/util/zstack/provider/provider.go b/pkg/util/zstack/provider/provider.go index d22f81aeee..5ea32ea869 100644 --- a/pkg/util/zstack/provider/provider.go +++ b/pkg/util/zstack/provider/provider.go @@ -67,7 +67,7 @@ func (self *SZStackProviderFactory) ValidateUpdateCloudaccountCredential(ctx con cloudaccount = username } password, _ := data.GetString("password") - if len(password) > 0 { + if len(password) == 0 { return nil, httperrors.NewMissingParameterError("password") } account := &cloudprovider.SCloudaccount{