Language: Go
Label: safe
CWE: CWE-287 \u2014 Improper Authentication
When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.

Code:
func TestPlainSplit_NoUser_MultiPass(t *testing.T) {
	a := Auth{
		passwd: []module.PlainAuth{
			mockAuth{
				db: map[string]bool{
					"user2": true,
				},
			},
			mockAuth{
				db: map[string]bool{
					"user1": true,
				},
			},
		},
	}

	err := a.AuthPlain("user1", "aaa")
	if err != nil {
		t.Fatal("Unexpected error:", err)
	}
}