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

config: fix "Insecure-security" constructor #2810

Merged
merged 1 commit into from
May 23, 2024
Merged

Conversation

sukunrt
Copy link
Member

@sukunrt sukunrt commented May 22, 2024

No description provided.

@sukunrt sukunrt requested a review from MarcoPolo May 22, 2024 13:29
@lidel lidel mentioned this pull request May 22, 2024
2 tasks
@MarcoPolo MarcoPolo changed the title config: fix Insecure security constructor config: fix "Insecure-security" constructor May 22, 2024
@@ -430,7 +432,12 @@ func (cfg *Config) NewNode() (host.Host, error) {
}

if err := cfg.addAutoNAT(bh); err != nil {
rh.Close()
app.Stop(context.Background())
if cfg.Routing != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be part of the stop lifecycle, no? Maybe we defer the fix until later

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wdym? We are not closing the host with the Stop lifecycle hook.

@MarcoPolo
Copy link
Collaborator

For folks skimming this PR. This is fixing the constructor for the "Insecure" security layer. It's not fixing an insecure construction of some other security layer.

Folks should not be using the Insecure module except outside of testing.

@sukunrt sukunrt merged commit 9f854e2 into master May 23, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants