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

[master] salt.channel.server.handle_message: be more defensive #66909

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mattp-
Copy link
Contributor

@mattp- mattp- commented Sep 20, 2024

What does this PR do?

it's possible _encrypt_private can throw depending on what key backend is used; so we should guard against any possible unhandled exceptions in this critical codepath. We already do this when wrapping the payload_handler, so we just move the other code in the same try.

I've also added some tests to cover different scenarios in handle_message as its untested atm.

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

No

Copy link
Contributor

@twangboy twangboy left a comment

Choose a reason for hiding this comment

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

Please add a changelog
There are also some failing tests

@mattp-
Copy link
Contributor Author

mattp- commented Sep 20, 2024

@twangboy will do, still looking at that. thanks

it's possible _encrypt_private can throw depending on what key backend
is used; so we should guard against any possible unhandled exceptions in
this critical codepath. We already do this when wrapping the
payload_handler, so we just move the other code in the same try.
@mattp-
Copy link
Contributor Author

mattp- commented Sep 23, 2024

@twangboy I didn't change anything but pushed the changelog.md, it seems to be passing minus one test. would you mind a sanity check/merge? Thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test:full Run the full test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants