Description
When trying to execute a script that is not whitlisted, the error response has content type application/json, but the content is in fact just a plain string:
$> curl -v -X POST --data '{"file": "/root/NoAccess.R"}' -H "Content-Type: application/json" <SERVER>:8998/batches
Note: Unnecessary use of -X or --request, POST is already inferred.
* Trying <IP ADDRESS>...
* TCP_NODELAY set
* Connected to <SERVER> (<IP ADDRESS>) port 8998 (#0)
> POST /batches HTTP/1.1
> Host: <SERVER>:8998
> User-Agent: curl/7.55.1
> Accept: /
> Content-Type: application/json
> Content-Length: 28
{{> }}
* upload completely sent off: 28 out of 28 bytes
< HTTP/1.1 400 Bad Request
< Date: Tue, 09 Oct 2018 08:20:12 GMT
< Content-Type: application/json; charset=UTF-8
< Content-Length: 83
< Server: Jetty(9.2.16.v20160414)
{{< }}
* Connection #0 to host <SERVER> left intact
"requirement failed: Local path /root/NoAccess.R cannot be added to user sessions."