diff --git a/README.md b/README.md index 3e9ecd1..8b7d179 100644 --- a/README.md +++ b/README.md @@ -323,7 +323,6 @@ Tests can be altered using four lists: - `data`: overrides data sent in the request - `autocomplete_headers`: overrides header autocompletion (currently sets `Connection: close` and `Content-Length` for requests with body data) - `encodedrequest`: overrides base64 encoded request - - `rawrequest`: permits to provide a raw request. `method`, `uri` and `version` values will be ignored - `ignore` is for tests you want to ignore. You should add a comment on why you ignore the test - `forcepass` is for tests you want to pass unconditionally. You should add a comment on why you force to pass the test - `forcefail` is for tests you want to fail unconditionally. You should add a comment on why you force to fail the test diff --git a/cmd/version.go b/cmd/version.go index 1e9e7fa..1b81c04 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -4,31 +4,31 @@ package cmd import ( - "fmt" - "os" + "fmt" + "os" - "github.com/rs/zerolog/log" - "github.com/spf13/cobra" + "github.com/rs/zerolog/log" + "github.com/spf13/cobra" - "github.com/coreruleset/go-ftw/internal/updater" + "github.com/coreruleset/go-ftw/internal/updater" ) func NewVersionCommand(version string) *cobra.Command { - return &cobra.Command{ - Use: "version", - Short: "Print the version number of go-ftw", - Run: func(cmd *cobra.Command, args []string) { - fmt.Println("go-ftw", version) - // do not run when in CI (e.g. GitHub Actions) - if os.Getenv("CI") != "true" { - latest, err := updater.LatestVersion() - if err != nil { - log.Error().Err(err).Msg("Failed to check for updates") - } else if latest != "" { - fmt.Println("Latest version is:", latest) - fmt.Println("Run 'go-ftw self-update' to update") - } - } - }, - } + return &cobra.Command{ + Use: "version", + Short: "Print the version number of go-ftw", + Run: func(cmd *cobra.Command, args []string) { + fmt.Println("go-ftw", version) + // do not run when in CI (e.g. GitHub Actions) + if os.Getenv("CI") != "true" { + latest, err := updater.LatestVersion() + if err != nil { + log.Error().Err(err).Msg("Failed to check for updates") + } else if latest != "" { + fmt.Println("Latest version is:", latest) + fmt.Println("Run 'go-ftw self-update' to update") + } + } + }, + } } diff --git a/config/types.go b/config/types.go index bbcb907..448a8bd 100644 --- a/config/types.go +++ b/config/types.go @@ -85,7 +85,6 @@ type Overrides struct { StopMagic *bool `yaml:"stop_magic" koanf:"stop_magic,omitempty"` AutocompleteHeaders *bool `yaml:"autocomplete_headers" koanf:"autocomplete_headers,omitempty"` EncodedRequest *string `yaml:"encoded_request,omitempty" koanf:"encoded_request,omitempty"` - RAWRequest *string `yaml:"raw_request,omitempty" koanf:"raw_request,omitempty"` OverrideEmptyHostHeader *bool `yaml:"override_empty_host_header,omitempty" koanf:"override_empty_host_header,omitempty"` } diff --git a/ftwhttp/request.go b/ftwhttp/request.go index 69315f3..f5d6e50 100644 --- a/ftwhttp/request.go +++ b/ftwhttp/request.go @@ -31,21 +31,11 @@ func NewRequest(reqLine *RequestLine, h Header, data []byte, autocompleteHeaders headers: h.Clone(), cookies: nil, data: data, - raw: nil, autoCompleteHeaders: autocompleteHeaders, } return r } -// NewRawRequest creates a new request, an initial request line, and headers -func NewRawRequest(raw []byte, b bool) *Request { - r := &Request{ - raw: raw, - autoCompleteHeaders: b, - } - return r -} - // SetAutoCompleteHeaders sets the value to the corresponding bool func (r *Request) SetAutoCompleteHeaders(value bool) { r.autoCompleteHeaders = value @@ -57,38 +47,17 @@ func (r Request) WithAutoCompleteHeaders() bool { } // SetData sets the data -// You can use only one of raw, encoded or data. +// You can use only one of encoded or data. func (r *Request) SetData(data []byte) error { - if utils.IsNotEmpty(r.raw) { - return errors.New("ftw/http: raw field is already present in this request") - } r.data = data return nil } -// SetRawData sets the data using raw bytes -// -// When using raw data, no other checks will be done. -// You are responsible of creating the request line, all the headers, and body. -// You can use only one of raw or data. -func (r *Request) SetRawData(raw []byte) error { - if utils.IsNotEmpty(r.data) { - return errors.New("ftw/http: data field is already present in this request") - } - r.raw = raw - return nil -} - // Data returns the data func (r Request) Data() []byte { return r.data } -// RawData returns the raw data -func (r Request) RawData() []byte { - return r.raw -} - // Headers return request headers func (r Request) Headers() Header { return r.headers @@ -121,84 +90,74 @@ func (r *Request) AddStandardHeaders() { } } -// isRaw is a helper that returns true if raw or encoded data -func (r Request) isRaw() bool { - return utils.IsNotEmpty(r.raw) -} - // The request should be created with anything we want. We want to actually break HTTP. func BuildRequest(r *Request) ([]byte, error) { var err error var b bytes.Buffer var data []byte - // Check if we need to create from all fields - if !r.isRaw() { - // Request line - _, err = fmt.Fprintf(&b, "%s", r.requestLine.ToString()) + // Request line + _, err = fmt.Fprintf(&b, "%s", r.requestLine.ToString()) + if err != nil { + return nil, err + } + + // We need to add the remaining headers, unless "NoDefaults" + if utils.IsNotEmpty(r.data) && r.WithAutoCompleteHeaders() { + // If there is no Content-Type, then we add one + r.AddHeader(ContentTypeHeader, "application/x-www-form-urlencoded") + data, err = encodeDataParameters(r.headers, r.data) if err != nil { + log.Info().Msgf("ftw/http: cannot encode data to: %q", r.data) return nil, err } - - // We need to add the remaining headers, unless "NoDefaults" - if utils.IsNotEmpty(r.data) && r.WithAutoCompleteHeaders() { - // If there is no Content-Type, then we add one - r.AddHeader(ContentTypeHeader, "application/x-www-form-urlencoded") - data, err = encodeDataParameters(r.headers, r.data) - if err != nil { - log.Info().Msgf("ftw/http: cannot encode data to: %q", r.data) - return nil, err - } - err = r.SetData(data) - if err != nil { - log.Info().Msgf("ftw/http: cannot set data to: %q", r.data) - return nil, err - } - } - - // Multipart form data needs to end in \r\n, per RFC (and modsecurity make a scene if not) - if ct := r.headers.Value(ContentTypeHeader); strings.HasPrefix(ct, "multipart/form-data;") { - crlf := []byte("\r\n") - lf := []byte("\n") - log.Debug().Msgf("ftw/http: with LF only - %d bytes:\n%x\n", len(r.data), r.data) - data = bytes.ReplaceAll(r.data, lf, crlf) - log.Debug().Msgf("ftw/http: with CRLF - %d bytes:\n%x\n", len(data), data) - r.data = data - } - - if r.WithAutoCompleteHeaders() { - r.AddStandardHeaders() - } - - _, err := r.Headers().WriteBytes(&b) + err = r.SetData(data) if err != nil { - log.Debug().Msgf("ftw/http: error writing to buffer: %s", err.Error()) + log.Info().Msgf("ftw/http: cannot set data to: %q", r.data) return nil, err } + } - // TODO: handle cookies - // if client.Jar != nil { - // for _, cookie := range client.Jar.Cookies(req.URL) { - // req.AddCookie(cookie) - // } - // } + // Multipart form data needs to end in \r\n, per RFC (and modsecurity make a scene if not) + if ct := r.headers.Value(ContentTypeHeader); strings.HasPrefix(ct, "multipart/form-data;") { + crlf := []byte("\r\n") + lf := []byte("\n") + log.Debug().Msgf("ftw/http: with LF only - %d bytes:\n%x\n", len(r.data), r.data) + data = bytes.ReplaceAll(r.data, lf, crlf) + log.Debug().Msgf("ftw/http: with CRLF - %d bytes:\n%x\n", len(data), data) + r.data = data + } - // After headers, we need one blank line - _, err = fmt.Fprintf(&b, "\r\n") + if r.WithAutoCompleteHeaders() { + r.AddStandardHeaders() + } + + _, err = r.Headers().WriteBytes(&b) + if err != nil { + log.Debug().Msgf("ftw/http: error writing to buffer: %s", err.Error()) + return nil, err + } + + // TODO: handle cookies + // if client.Jar != nil { + // for _, cookie := range client.Jar.Cookies(req.URL) { + // req.AddCookie(cookie) + // } + // } + + // After headers, we need one blank line + _, err = fmt.Fprintf(&b, "\r\n") + if err != nil { + log.Debug().Msgf("ftw/http: error writing to buffer: %s", err.Error()) + return nil, err + } + // Now the body, if anything + if utils.IsNotEmpty(r.data) { + _, err = fmt.Fprintf(&b, "%s", r.data) if err != nil { log.Debug().Msgf("ftw/http: error writing to buffer: %s", err.Error()) return nil, err } - // Now the body, if anything - if utils.IsNotEmpty(r.data) { - _, err = fmt.Fprintf(&b, "%s", r.data) - if err != nil { - log.Debug().Msgf("ftw/http: error writing to buffer: %s", err.Error()) - return nil, err - } - } - } else { - dumpRawData(&b, r.raw) } return b.Bytes(), err @@ -256,7 +215,3 @@ func encodeDataParameters(h Header, data []byte) ([]byte, error) { } return data, err } - -func dumpRawData(b *bytes.Buffer, raw []byte) { - fmt.Fprintf(b, "%s", raw) -} diff --git a/ftwhttp/request_test.go b/ftwhttp/request_test.go index 90f1181..2d97bd7 100644 --- a/ftwhttp/request_test.go +++ b/ftwhttp/request_test.go @@ -4,7 +4,6 @@ package ftwhttp import ( - "errors" "testing" "github.com/stretchr/testify/suite" @@ -119,39 +118,11 @@ Content-Type: text/plain Some-file-test-here ----------397236876--`) req = NewRequest(rl, h, data, true) + // assert that the request is multipart/form-data + s.Require().Contains(string(req.Data()), "--397236876") - s.False(req.isRaw()) } -func generateBaseRawRequestForTesting() *Request { - var req *Request - - raw := []byte(`POST / HTTP/1.1 -Connection: close -Content-Length: 123x -Content-Type: application/x-www-form-urlencoded -Host: localhost -User-Agent: ModSecurity CRS 3 Tests -`) - req = NewRawRequest(raw, true) - - return req -} - -func (s *requestTestSuite) TestGenerateBaseRawRequestForTesting() { - var req *Request - - raw := []byte(`POST / HTTP/1.1 -Connection: close -Content-Length: 123x -Content-Type: application/x-www-form-urlencoded -Host: localhost -User-Agent: ModSecurity CRS 3 Tests -`) - req = NewRawRequest(raw, false) - - s.False(req.autoCompleteHeaders) -} func (s *requestTestSuite) TestRequestLine() { rl := &RequestLine{ Method: "UNEXISTENT", @@ -247,34 +218,6 @@ func (s *requestTestSuite) TestRequestData() { s.Equal([]byte("This is the data now"), req.Data(), "failed to set data") } -func (s *requestTestSuite) TestRequestSettingRawDataWhenThereIsData() { - req := generateBaseRequestForTesting() - - err := req.SetRawData([]byte("This is the data now")) - - expectedError := errors.New("ftw/http: data field is already present in this request") - s.Error(err) - s.Equal(expectedError, err) -} - -func (s *requestTestSuite) TestRequestRawData() { - req := generateBaseRawRequestForTesting() - - err := req.SetRawData([]byte("This is the RAW data now")) - s.Require().NoError(err) - - s.Equal([]byte("This is the RAW data now"), req.RawData()) -} - -func (s *requestTestSuite) TestRequestSettingDataWhenThereIsRawData() { - req := generateBaseRawRequestForTesting() - - err := req.SetData([]byte("This is the data now")) - expectedError := errors.New("ftw/http: raw field is already present in this request") - s.Error(err) - s.Equal(expectedError, err) -} - func (s *requestTestSuite) TestRequestURLParse() { req := generateBaseRequestForTesting() @@ -297,45 +240,45 @@ func (s *requestTestSuite) TestRequestURLParseFail() { func (s *requestTestSuite) TestRequestEncodesPostData() { tests := []struct { - raw string - encoded string + original string + encoded string }{ { - raw: "", - encoded: "", + original: "", + encoded: "", }, { - raw: "hello=world", - encoded: "hello=world", + original: "hello=world", + encoded: "hello=world", }, { - raw: "foo bar", - encoded: "foo+bar", + original: "foo bar", + encoded: "foo+bar", }, { - raw: "name=panda&food=bamboo", - encoded: "name=panda&food=bamboo", + original: "name=panda&food=bamboo", + encoded: "name=panda&food=bamboo", }, { // Test adding semicolons to test parse - raw: `c4= ;c3=t;c2=a;c1=client;a1=/;a2=e;a3=t;a4=client;a5=/;a6=p;a7=a;a8=s;a9=s;a10=w;a11=d;$c1$c2$c3$c4$a1$a2$a3$a4$a5$a6$a7$a8$a9$a10$a11`, - encoded: `c4=+%3Bc3%3Dt%3Bc2%3Da%3Bc1%3Dclient%3Ba1%3D%2F%3Ba2%3De%3Ba3%3Dt%3Ba4%3Dclient%3Ba5%3D%2F%3Ba6%3Dp%3Ba7%3Da%3Ba8%3Ds%3Ba9%3Ds%3Ba10%3Dw%3Ba11%3Dd%3B%24c1%24c2%24c3%24c4%24a1%24a2%24a3%24a4%24a5%24a6%24a7%24a8%24a9%24a10%24a11`, + original: `c4= ;c3=t;c2=a;c1=client;a1=/;a2=e;a3=t;a4=client;a5=/;a6=p;a7=a;a8=s;a9=s;a10=w;a11=d;$c1$c2$c3$c4$a1$a2$a3$a4$a5$a6$a7$a8$a9$a10$a11`, + encoded: `c4=+%3Bc3%3Dt%3Bc2%3Da%3Bc1%3Dclient%3Ba1%3D%2F%3Ba2%3De%3Ba3%3Dt%3Ba4%3Dclient%3Ba5%3D%2F%3Ba6%3Dp%3Ba7%3Da%3Ba8%3Ds%3Ba9%3Ds%3Ba10%3Dw%3Ba11%3Dd%3B%24c1%24c2%24c3%24c4%24a1%24a2%24a3%24a4%24a5%24a6%24a7%24a8%24a9%24a10%24a11`, }, { // Already encoded - raw: "foo+bar", - encoded: "foo+bar", + original: "foo+bar", + encoded: "foo+bar", }, } for _, tc := range tests { tt := tc - s.Run(tt.raw, func() { + s.Run(tt.original, func() { req := generateBaseRequestForTesting() h := req.Headers() h.Add(ContentTypeHeader, "application/x-www-form-urlencoded") - err := req.SetData([]byte(tt.raw)) + err := req.SetData([]byte(tt.original)) s.Require().NoError(err) result, err := encodeDataParameters(h, req.Data()) s.Require().NoError(err, "Failed to encode %s", req.Data()) diff --git a/ftwhttp/types.go b/ftwhttp/types.go index 1f06207..2cd0102 100644 --- a/ftwhttp/types.go +++ b/ftwhttp/types.go @@ -75,7 +75,6 @@ type Request struct { headers Header cookies http.CookieJar data []byte - raw []byte autoCompleteHeaders bool } diff --git a/runner/run.go b/runner/run.go index 71d3f8c..f472015 100644 --- a/runner/run.go +++ b/runner/run.go @@ -318,14 +318,6 @@ func checkTestSanity(stage *schema.Stage) error { if utils.IsNotEmpty(stage.Input.Data) && stage.Input.EncodedRequest != "" { return errors.New("'data' and 'encoded_request' must not be set simultaneously") } - //nolint:staticcheck - if utils.IsNotEmpty(stage.Input.Data) && stage.Input.RAWRequest != "" { - return errors.New("'data' and 'raw_request' must not be set simultaneously") - } - //nolint:staticcheck - if stage.Input.EncodedRequest != "" && stage.Input.RAWRequest != "" { - return errors.New("'encoded_request' and 'raw_request' must not be set simultaneously") - } if len(stage.Output.Log.ExpectIds) != 1 && stage.Output.Isolated { return errors.New("'isolated' is only valid if 'expected_ids' has exactly one entry") } @@ -410,28 +402,18 @@ func checkResult(c *check.FTWCheck, response *ftwhttp.Response, responseError er func getRequestFromTest(testInput test.Input) *ftwhttp.Request { var req *ftwhttp.Request - // get raw request, if anything - raw, err := testInput.GetRawRequest() - if err != nil { - log.Error().Msgf("ftw/run: error getting raw data: %s\n", err.Error()) - } - // If we use raw or encoded request, then we don't use other fields - if raw != nil { - req = ftwhttp.NewRawRequest(raw, *testInput.AutocompleteHeaders) - } else { - rline := &ftwhttp.RequestLine{ - Method: testInput.GetMethod(), - URI: testInput.GetURI(), - Version: testInput.GetVersion(), - } + rline := &ftwhttp.RequestLine{ + Method: testInput.GetMethod(), + URI: testInput.GetURI(), + Version: testInput.GetVersion(), + } - data := testInput.ParseData() - // create a new request - req = ftwhttp.NewRequest(rline, testInput.Headers, - data, *testInput.AutocompleteHeaders) + data := testInput.ParseData() + // create a new request + req = ftwhttp.NewRequest(rline, testInput.Headers, + data, *testInput.AutocompleteHeaders) - } return req } diff --git a/runner/run_input_override_test.go b/runner/run_input_override_test.go index 8b0141c..e0f91a5 100644 --- a/runner/run_input_override_test.go +++ b/runner/run_input_override_test.go @@ -42,7 +42,6 @@ testoverride: {{ with .Protocol }}protocol: {{ . }}{{ end }} {{ with .Data }}data: {{ . }}{{ end }} {{ with .EncodedRequest }}encoded_request: {{ . }}{{ end }} - {{ with .RawRequest }}raw_request: {{ . }}{{ end }} {{ with .Headers }} headers: {{ with .Host }}Host: {{ . }}{{ end }} @@ -90,9 +89,6 @@ var overrideConfigMap = map[string]interface{}{ "TestApplyInputOverrideEncodedRequest": map[string]interface{}{ "EncodedRequest": "overrideb64", }, - "TestApplyInputOverrideRAWRequest": map[string]interface{}{ - "RawRequest": "overrideraw", - }, "TestApplyInputOverrideProtocol": map[string]interface{}{ "Protocol": "HTTP/1.1", }, @@ -353,18 +349,3 @@ func (s *inputOverrideTestSuite) TestApplyInputOverrideEncodedRequest() { s.NoError(err, "Failed to apply input overrides") s.Equal(overrideEncodedRequest, testInput.EncodedRequest, "`EncodedRequest` should have been overridden") } - -func (s *inputOverrideTestSuite) TestApplyInputOverrideRAWRequest() { - originalRAWRequest := "original" - overrideRAWRequest, err := getOverrideConfigValue("RawRequest") - s.Require().NoError(err, "cannot get override value") - - testInput := test.Input{ - RAWRequest: originalRAWRequest, - } - - test.ApplyInputOverrides(s.cfg, &testInput) - - //nolint:staticcheck - s.Equal(overrideRAWRequest, testInput.RAWRequest, "`RAWRequest` should have been overridden") -} diff --git a/runner/run_test.go b/runner/run_test.go index ae02361..ae99478 100644 --- a/runner/run_test.go +++ b/runner/run_test.go @@ -84,11 +84,6 @@ testoverride: testoverride: input: encoded_request: %s -`, - "TestApplyInputOverrideRAWRequest": `--- -testoverride: - input: - raw_request: %s `, } @@ -432,37 +427,6 @@ func (s *runTestSuite) TestGetRequestFromTestWithAutocompleteHeaders() { s.Equal("close", request.Headers().Get("Connection"), "Autocompletion should add 'Connection: close' header") } -func (s *runTestSuite) TestGetRawRequestFromTestWithAutocompleteHeaders() { - boolean := true - method := "POST" - input := test.Input{ - AutocompleteHeaders: &boolean, - Method: &method, - Headers: ftwhttp.Header{}, - DestAddr: &s.dest.DestAddr, - Port: &s.dest.Port, - Protocol: &s.dest.Protocol, - RAWRequest: "POST / HTTP/1.1\r\nHost: localhost\r\nUser-Agent: test\r\n\r\n", - } - request := getRequestFromTest(input) - - client, err := ftwhttp.NewClient(ftwhttp.NewClientConfig()) - s.Require().NoError(err) - - dest := &ftwhttp.Destination{ - DestAddr: input.GetDestAddr(), - Port: input.GetPort(), - Protocol: input.GetProtocol(), - } - err = client.NewConnection(*dest) - s.Require().NoError(err) - _, err = client.Do(*request) - s.Require().NoError(err) - - s.Equal("", request.Headers().Get("Content-Length"), "Raw requests should not be modified") - s.Equal("", request.Headers().Get("Connection"), "Raw requests should not be modified") -} - func (s *runTestSuite) TestGetRequestFromTestWithoutAutocompleteHeaders() { boolean := false method := "POST" diff --git a/test/defaults.go b/test/defaults.go index 222c88f..2aea607 100644 --- a/test/defaults.go +++ b/test/defaults.go @@ -81,11 +81,6 @@ func (i *Input) GetRawRequest() ([]byte, error) { // if Encoded, first base64 decode, then dump return base64.StdEncoding.DecodeString(i.EncodedRequest) } - //nolint:staticcheck - if utils.IsNotEmpty(i.RAWRequest) { - //nolint:staticcheck - return []byte(i.RAWRequest), nil - } return nil, nil } diff --git a/test/defaults_test.go b/test/defaults_test.go index 8d3ba98..1fa2347 100644 --- a/test/defaults_test.go +++ b/test/defaults_test.go @@ -4,7 +4,6 @@ package test import ( - "bytes" "testing" "github.com/stretchr/testify/suite" @@ -57,34 +56,6 @@ func getTestExampleInput() *Input { return &inputTest } -func getRawInput() *Input { - destaddr := "192.168.0.1" - port := 8080 - protocol := "http" - - inputTest := Input{ - DestAddr: &destaddr, - Port: &port, - Protocol: &protocol, - RAWRequest: `GET / HTTP/1.0 -Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 -Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 -Accept-Encoding: gzip,deflate -Accept-Language: en-us,en;q=0.5 -Acunetix-Product: WVS/5.0 (Acunetix Web Vulnerability Scanner - EVALUATION) -Connection: close -Host: localhost -Keep-Alive: 300 -Proxy-Connection: keep-alive -User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727) - `, - SaveCookie: func() *bool { b := false; return &b }(), - AutocompleteHeaders: func() *bool { b := true; return &b }(), - } - - return &inputTest -} - func (s *defaultsTestSuite) TestBasicGetters() { input := getTestExampleInput() @@ -100,8 +71,6 @@ func (s *defaultsTestSuite) TestBasicGetters() { s.Equal("http", proto) uri := input.GetURI() s.Equal("/test", uri) - request, _ := input.GetRawRequest() - s.Equal([]byte("My Data\n"), request) } func (s *defaultsTestSuite) TestDefaultGetters() { @@ -127,12 +96,3 @@ func (s *defaultsTestSuite) TestDefaultGetters() { s.Equal([]byte("My Data"), []byte(*inputDefaults.Data)) } - -func (s *defaultsTestSuite) TestRaw() { - raw := getRawInput() - - s.True(*raw.AutocompleteHeaders) - - request, _ := raw.GetRawRequest() - s.NotEqual(2, bytes.Index(request, []byte("Acunetix"))) -} diff --git a/test/types.go b/test/types.go index 7105867..4d6802e 100644 --- a/test/types.go +++ b/test/types.go @@ -108,11 +108,6 @@ func applySimpleOverrides(overrides *config.Overrides, input *Input) { if overrides.EncodedRequest != nil { input.EncodedRequest = *overrides.EncodedRequest } - - if overrides.RAWRequest != nil { - //nolint:staticcheck - input.RAWRequest = *overrides.RAWRequest - } } func applyHeadersOverride(overrides *config.Overrides, input *Input) {