Skip to content

Wrong if check condition, error handling logic never trigger forever #5428

@zyfrank

Description

@zyfrank

if len(req.TrustedCommit.Signatures) > len(req.TrustedCommit.Signatures) {
return nil, fmt.Errorf("More signatures than validators")
}
if len(req.UntrustedCommit.Signatures) > len(req.UntrustedCommit.Signatures) {
return nil, fmt.Errorf("More signatures than validators")
}

should change to
if len(req.TrustedCommit.Signatures) > len(req.TrustedCommit.Validators)

and

if len(req.UntrustedCommit.Signatures) > len(req.UntrustedCommit.Validators)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions