-
Notifications
You must be signed in to change notification settings - Fork 2
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
Handle LFE bytes in REST handler #9
Comments
How tricky would it be to redefine the LFE code that parses funcalls to check a white/blacklist? i.e.
|
This discussion should probably be in ticket #4. This ticket is just for providing the functionality of string parsing for use by the YAWS appmod/REST service. I should have put more detail in the ticket description. |
Alight, I've made a very first pass at this. Still not sure about going the LFE shell process route or the ENV management route (#14). I'm leaning towards ENV now ... Anyway, here's a screenie showing some basic evaluation happening in the REST server and then getting passed up to the JS in the browser: |
These three issues, #8 #9 and #14, are really three sides of the same problem so I will write once and copy and then we will see where the discussion goes.
An easier way might then be to use the existing shell but to reset where the shell's, and the processes it starts, http://www.geekherocomic.com/2008/11/12/real-programmers-dont-write-documentation/ This can also make the shell manager easier. The real question is then how we want to interface the "shell".
|
The command results coming back into JavaScript from the REST server that executes the LFE code are getting converted to JSON before they do. There's nothing yet that deserializes data structures. For instance, calling This is one of many things that will have to be addressed by the JS command/results parsing code. I'll update the main description with tasks as I identity them. |
Addressed this with the following change: - (json (ljson:encode `#(result ,result))))
+ (str-result (lists:flatten (lfe_io:fwrite1 "~p~n" `(,result))))
+ (json (ljson:encode `#(result ,(list_to_binary str-result))))) |
I think we're just going to receive bytes ... let me update the title and the description. |
Task:
mod:func
occurrences in stringmod:func
s, reject the entire payload out of hand, returning an appropriate HTTP error and JSON error payloadDepends upon:
The text was updated successfully, but these errors were encountered: