forked from joshmarshall/jsonrpclib
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
jsonrpc: Don't proxy "special" methods
Code that expects ServerProxy objects to be regular python objects can trigger bogus rpc calls by accessing "special" methods (i.e. methods starting and ending with two underscores). Avoid this by raising AttributeError for such names instead of returning a method proxy. A real life example for this is the "raven" sentry client calling `__getattribute__('__sentry__')` on a ServerProxy instance when reporting an exception.
- Loading branch information
1 parent
5f53fcd
commit 1b6feb3
Showing
2 changed files
with
7 additions
and
0 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