Closed alem0lars-yr closed 5 years ago
Hi, thanks for the report. Any suggestions on how to fix it?
It's not 100% clear to my why it is expected to return http content instead of just the plain content.
Could you explain why it parses the result from the sandbox as a http response ?
Thanks.
I know this is kind of a late follow-up, but I ran into this, too.
Imho, the commit https://github.com/mushorg/glastopf/commit/8b37e1dcdce175999703cb9776c44c4d3e57fab4 breaks the handling of rfi and php sandbox: It assumes that an http response code is always submitted in the response. However, if the sandbox is executed, it delivers raw text output.
A workaround is to change the line 56 of wsgi_wrapper.py from else:
to something like
elif "HTTP/" in h:
But maybe you have found a better solution.
Try to run:
Note: Change 8080 with the port where glastopf is running.
However when the included file doesn't output the response headers (but just some php code, like the example above) the parser fails because header contains both the header (empty) and the body (containing the evaluated php code).
In that case, the file
wsgi_wrapper
fails in: