Skip to content

Commit

Permalink
Merge pull request #122 from roidelapluie/fix-release-0.7
Browse files Browse the repository at this point in the history
Fix release 0.7 tests
  • Loading branch information
roidelapluie authored Nov 29, 2022
2 parents 2528877 + 0af5c3f commit 5aab180
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions web/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ func TestBasicAuthWithFakepassword(t *testing.T) {
// TestByPassBasicAuthVuln tests for CVE-2022-46146.
func TestByPassBasicAuthVuln(t *testing.T) {
server := &http.Server{
Addr: port,
Handler: http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("Hello World!"))
}),
Expand All @@ -146,12 +147,7 @@ func TestByPassBasicAuthVuln(t *testing.T) {
})

go func() {
flags := FlagConfig{
WebListenAddresses: &([]string{port}),
WebSystemdSocket: OfBool(false),
WebConfigFile: OfString("testdata/web_config_users_noTLS.good.yml"),
}
ListenAndServe(server, &flags, testlogger)
ListenAndServe(server, "testdata/web_config_users_noTLS.good.yml", testlogger)
close(done)
}()

Expand Down

0 comments on commit 5aab180

Please sign in to comment.