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

Add support for protecting __calls__, by adding "allow_unprotected_calls" protocol flag #240

Closed
wants to merge 2 commits into from

Conversation

seveirein
Copy link
Contributor

@seveirein seveirein commented Nov 9, 2017

See: #239

Oops---Sorry this patch is garbage (will be resubmitting fixed).

…r netrefs ("allow_unprotected_calls")

Whenever you call a netref with rpyc, formerly the call passes through even on the most restrictive
security settings. This is almost necessary, given that blocking __call__ means that every naked function/method
will not be callable, unless augmented by adding _rpyc_getattr_. This commit checks wrapped/bound calls to see
if they are accessible from thier parent __self__ (via their __name__), and allows them.

There are now also _rpyc_class_getattr/_rpyc_class_setattr/_rpyc_class_getattr which are used when the object
being queried is a class. Otherwise their non-class equivalents are still used, and if they raise
AttributeError, the class versions are called (if available).
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.

1 participant