Language: Go
Label: vulnerable
CWE: CWE-521 \u2014 Weak Password Requirements
The product does not require that users should have strong passwords, which makes it easier for attackers to compromise user accounts.

Code:
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{
			ErrorField: "pass",
			ErrorMsg:   err.Error(),
		}
		errFields = append(errFields, errField)
		return errFields, err
	}
	return nil, nil
}