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

More p2p proxy checks #7797

Merged
merged 2 commits into from
Dec 8, 2020
Merged

More p2p proxy checks #7797

merged 2 commits into from
Dec 8, 2020

Conversation

aschmahmann
Copy link
Contributor

Added a few checks to the p2p proxy to return errors to the client rather than just logging them on the daemon.

Comment on lines +64 to +66
if _, err := peer.Decode(split[2]); err != nil {
return nil, fmt.Errorf("Invalid request path '%s'", path)
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This effectively changes the error code for an invalid peerID from 502 to 400 and shows an error to the user instead of just logging on the server.

@aschmahmann aschmahmann merged commit edde280 into master Dec 8, 2020
@aschmahmann aschmahmann deleted the fix/p2p-proxy-checks branch December 8, 2020 22:15
@aschmahmann aschmahmann mentioned this pull request Feb 18, 2021
73 tasks
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