Comments (1)
This would make API functions implicitly callable when provided by the
lower security layer. Can you discuss what implications you think this has
for security?
On Tue, Aug 16, 2016 at 10:46 AM, aaaaalbert [email protected]
wrote:
*Note: This was previously filed as SeattleTestbed/repy_v2#70
SeattleTestbed/repy_v2#70, but is not a problemof Repy. I slightly update / summarize the description here.*
Calls can be added to the RepyV2 API by editing namespace.py.
Unfortunately, libraries that are dylinked in do not get immediate access
to new API calls unless dylink.r2py is also modified so that its
understanding of STOCK_API includes the added call's name. Otherwise, a
NameError is raised.Assume that your Repy API defines the call below.# Importing this program as a library in another # program causes a NameError.
new_repy_api_function_that_is_not_in_dylink_stock_api()
To confuse matters, the NameError is only present when that code is dylinked
in from another program. You can directly run it just fine, and it's also
fine to run it as the main program under dylink, i.e. repy.py
restrictionsfile dylink.r2py that_code.r2py.Instead of requiring manual changes triggered by peculiar-to-obscure error
conditions, we can change dylink to just introspect its execution context
(_context) and recreate STOCK_API from all the objects of type
'instancemethod'.The reason for this seemingly weird type is that the Repy API functions
are not visible as Python function types, but bound methods
NamespaceAPIFunctionWrapper.wrapped_function. A template method for
comparison may be created like so:class A():
def b():
passa = A()type(a.b) # <type 'instancemethod'>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#184, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AA0XD9uTwtqtxrPT_31dmRaUSneubgtFks5qgc0-gaJpZM4JlfXD
.
from seattlelib_v2.
Related Issues (20)
- [Unit Test Failure]: ut_seattelib_tcptime.py HOT 3
- [Unit Testing]: Possible Missing Test Condition in `ut_seattlelib_time_interface_updatetime_before_registermethod.r2py` HOT 3
- `repypp.py` should have unit tests HOT 3
- exception when creating geoip location string... HOT 1
- Dylink doesn't allow us to call functions that start with '_' HOT 2
- dnscommon.r2py cannot parse replies containing NS, PTR types of queries HOT 1
- dnscommon.r2py cannot parse replies containing MX type of queries and it doesn't support 'AAAA' records HOT 1
- Fix `httpretrieve`'s use of "Host" header field
- misuse of callargs in argparse.r2py
- Encasementlib treats all args as security layers HOT 3
- wrapper.r2py needs better error messages for function's argument type checking HOT 3
- Refactor library function names? HOT 1
- Port `strace.py` to RepyV2
- Add trigonometric functions to `math.r2py` HOT 1
- Repeating `centralizedadvertise.r2py` and `centralizedadvertise_v2.r2py`. Problem with `advertiseserver_v2.poly.edu` HOT 2
- Delete obsolete seattlelib_v2.wiki HOT 1
- Separate `dylink` and `encasementlib` cleanly
- Remove `repyportability` from pure-Repy tests
- Bug in wrapper.r2py where argument validity check for 'bool' type fails HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from seattlelib_v2.