-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix HTTP code for permission denied errors
Fixes #3697 The existing code and test case only covered the leader behavior. When querying against non-leaders the error has an "rpc error: " prefix. To provide consistency in HTTP error response I also strip the "rpc error: " prefix for 403 responses as they offer no beneficial additional information (and in theory disclose a tiny bit of data to unauthorized users, but it would be a pretty weird bit of data to use in a malicious way).
- Loading branch information
1 parent
357213d
commit c42c780
Showing
2 changed files
with
29 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters