jsleuth
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2014
03:35 PM
BrightScript Injection/Eval?
Hi All,
Wondering if it is possible within a Roku app to retrieve BriteScript from a webservice (probably as a simple string) and then evaluate/interpret that string as Britescript and run it within the app?
Use-case is a basic ad-insertion piece for my own app that can run different business logic depending on the return from the webservice. Hoping to keep my options open rather than fixing them when the app is launched.
Thanks,
J
Wondering if it is possible within a Roku app to retrieve BriteScript from a webservice (probably as a simple string) and then evaluate/interpret that string as Britescript and run it within the app?
Use-case is a basic ad-insertion piece for my own app that can run different business logic depending on the return from the webservice. Hoping to keep my options open rather than fixing them when the app is launched.
Thanks,
J
1 REPLY 1
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2014
03:52 PM
Re: BrightScript Injection/Eval?
Yes, it is possible but i would not encourage that.
The error-handling in B/S is limited and in addition you open yourself to external hacking of your channel (since you trust external code). Also, repeated calls of "eval" will slowly leak memory, as compiler generates new bytecode on every call.
The error-handling in B/S is limited and in addition you open yourself to external hacking of your channel (since you trust external code). Also, repeated calls of "eval" will slowly leak memory, as compiler generates new bytecode on every call.