Skip to content

Stop Axum’s JSON extractor from reporting errors that give hackers clues to what they're doing wrong #3301

Answered by mladedav
softwarenerd asked this question in Q&A
Discussion options

You must be logged in to vote

First and foremost, don't build your security on an assumption that an attacker does not know your payload schema. If you want to have at least basic security, assume they have access to the source code.

For your actual question, see WithRejection and specifically the customize-extractor-error example.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@jplatte
Comment options

@softwarenerd
Comment options

@softwarenerd
Comment options

@jplatte
Comment options

@softwarenerd
Comment options

Answer selected by jplatte
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants