|
|
|
Whats going on is that the LSL Mono compiler is mapping events as global functions. So in the example below, internally the listen event has the name "defaultchat", "default" being the state and "chat" being the event. User defined global functions are exposed by just there name, so if I have a global function name "monkeys" then the compiler exposes that as "monkeys". The compiler doesn't mark events as events and the VM doesn't care as long as the signature matches (signature being the name, return type, and parameter types). So if I name a global function as "defaultchat" and it just so happens that a listen event is to be triggered the VM looks to see if my script implements "defaultchat" with the correct signature, if I have it calls it.
======================== listen(integer a, string b, key c, string d) { llOwnerSay("listen"); }} ======================== As to exploitable, I haven't had time to really think about all the implications of this. Basically you would implement an event handler outside of the state scope and hope the user just thinks it's dead code, a comment or a string. Something like: string item = "Item"; default money(key user, integer amount) if(amount > 0) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Are you saying that a function named "defaultchat" somehow overshadows a listen event in the default state?
What happens when a listen event comes in in that case?
Why does the first example fail to run?