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

Switch some auth errors from Internal to InvalidInput. #976

Merged
merged 2 commits into from
Aug 1, 2023

Conversation

dmkozh
Copy link
Contributor

@dmkozh dmkozh commented Aug 1, 2023

What

Switch some auth errors from Internal to InvalidInput.

Why

These actually can be caused by invalid user input and are not a sign of implementation issue (which we use internal errors for). The reason is that we convert the whole user-provided auth tree to the context for custom auth, without sanitizing it.

Known limitations

We don't perform this validation check for classic account auth. While this is a minor inconsistency, I don't think it's worth spending CPU time on it - the invalid entries will just not be matched to anything and there aren't potential problems due to that (whereas in case of custom account authentication providing invalid context might result in incorrect logic).

These actually can be caused by invalid user input and are not a sign of implementation issue (which we use internal errors for). The reason is that we convert the whole user-provided auth tree to the context for custom auth, without sanitizing it.
@dmkozh dmkozh enabled auto-merge (squash) August 1, 2023 21:27
@dmkozh dmkozh merged commit 16a7322 into stellar:main Aug 1, 2023
8 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