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

Commits on Nov 9, 2017

  1. Add a new protocol configuration to control security on __call__'s fo…

    …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).
    seveirein committed Nov 9, 2017
    Configuration menu
    Copy the full SHA
    759a668 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    041c485 View commit details
    Browse the repository at this point in the history