Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixing insecure_skip_verify #9413

Merged
merged 1 commit into from Jun 22, 2021
Merged

fixing insecure_skip_verify #9413

merged 1 commit into from Jun 22, 2021

Conversation

MyaLongmire
Copy link
Contributor

Required for all PRs:

  • Updated associated README.md.
  • Wrote appropriate unit tests.

resolves #9389

removed tls from HTTP struct since it gets imported with HTTPClientConfig

@telegraf-tiger telegraf-tiger bot added the feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin label Jun 22, 2021
@sspaink
Copy link
Contributor

sspaink commented Jun 22, 2021

We could add a unit test to verify the config to prevent this kind of regression in the future, something like this:

func TestConfig(t *testing.T) {
	c := config.NewConfig()
	require.NoError(t, c.LoadConfig("./testdata/http.toml"))
	output := outputs.Outputs["http"]().(*HTTP)
	output.URL = "http://127.0.0.1:8080/telegraf"
	c.Outputs[0].Output.(*HTTP).serializer = nil
	require.Equal(t, output, c.Outputs[0].Output)
}

edit: Don't think this is necessary for this change, maybe something to consider for the future

@popey
Copy link
Contributor

popey commented Jun 22, 2021

Tested with the issue provided at this discussion and it works. Thanks @MyaLongmire !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Telegraf v1.19.0 insecure_skip_verify broken in outputs.http
3 participants