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

Clean up some of the error handling code in Oak Functions #4502

Merged
merged 1 commit into from
Nov 23, 2023

Conversation

andrisaar
Copy link
Collaborator

Mostly just more efficient use of anyhow (instead of formatting bazillions of strings), but also one meaningful change:

The EncryptionHandler::invoke had an expect() in it, which means that if someone sends an RPC with no public key, the server will promptly crash.
The server should never panic on invalid user input, otherwise this provides a way how to DoS the server. This replaces the expect with proper error propagation, which should fail the RPC (but keep the server alive for other requests).

Copy link
Collaborator

@tiziano88 tiziano88 left a comment

Choose a reason for hiding this comment

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

Good catch

@andrisaar andrisaar merged commit 03f2678 into project-oak:main Nov 23, 2023
@andrisaar andrisaar deleted the refactor branch November 23, 2023 15:39
@ipetr0v ipetr0v removed their request for review November 24, 2023 13:40
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