Security
Headlines
HeadlinesLatestCVEs

Headline

CVE-2023-4125: fix(password): password can't contains space. · answerdev/answer@7d23b17

Weak Password Requirements in GitHub repository answerdev/answer prior to v1.1.0.

CVE
#js#git

Expand Up

@@ -262,35 +262,29 @@ type UserRegisterReq struct {

}

func (u *UserRegisterReq) Check() (errFields []*validator.FormErrorField, err error) {

// TODO i18n

err = checker.CheckPassword(8, 32, 0, u.Pass)

if err != nil {

errField := &validator.FormErrorField{

if err = checker.CheckPassword(u.Pass); err != nil {

errFields = append(errFields, &validator.FormErrorField{

ErrorField: "pass",

ErrorMsg: err.Error(),

}

errFields = append(errFields, errField)

})

return errFields, err

}

return nil, nil

}

type UserModifyPasswordReq struct {

OldPass string `validate:"omitempty,gte=8,lte=32" json:"old_pass"`

Pass string `validate:"required,gte=8,lte=32" json:"pass"`

OldPass string `validate:"omitempty,gte=8,lte=32" json:"old_pass"`

Pass string `validate:"required,gte=8,lte=32" json:"pass"`

UserID string `json:"-"`

AccessToken string `json:"-"`

}

func (u *UserModifyPasswordReq) Check() (errFields []*validator.FormErrorField, err error) {

// TODO i18n

err = checker.CheckPassword(8, 32, 0, u.Pass)

if err != nil {

errField := &validator.FormErrorField{

if err = checker.CheckPassword(u.Pass); err != nil {

errFields = append(errFields, &validator.FormErrorField{

ErrorField: "pass",

ErrorMsg: err.Error(),

}

errFields = append(errFields, errField)

})

return errFields, err

}

return nil, nil

Expand Down Expand Up

@@ -352,14 +346,11 @@ type UserRePassWordRequest struct {

}

func (u *UserRePassWordRequest) Check() (errFields []*validator.FormErrorField, err error) {

// TODO i18n

err = checker.CheckPassword(8, 32, 0, u.Pass)

if err != nil {

errField := &validator.FormErrorField{

if err = checker.CheckPassword(u.Pass); err != nil {

errFields = append(errFields, &validator.FormErrorField{

ErrorField: "pass",

ErrorMsg: err.Error(),

}

errFields = append(errFields, errField)

})

return errFields, err

}

return nil, nil

Expand Down

Related news

GHSA-j63x-f657-2m9g: Answer has Weak Password Requirements

Weak Password Requirements in GitHub repository answerdev/answer prior to v1.1.0.

CVE: Latest News

CVE-2023-50976: Transactions API Authorization by oleiman · Pull Request #14969 · redpanda-data/redpanda
CVE-2023-6905
CVE-2023-6903
CVE-2023-6904
CVE-2023-3907