News for hackers. Stuff that matters.
Re:URL to PDF Microservice by kimmobru on Thursday October 05, 2017 @04:21PM (#15412295)
I gave this a thought for a moment. Since we're using a real browser, there are huge amount of different ways to get the browser display a file:// link. Redirect is one, window.location.href is another, etc. The service shouldn't be run publicly in the internet for real use cases. If you do, the server should be designed in a way that it's not dangerous if the web server user gets read access to file system. I added a warning about this in the top of the README.
Re:URL to PDF Microservice by cutcss on Thursday October 05, 2017 @05:03PM (#15412572)
You are using Chrome headless therefore you can use group policy to add "file://" to the URL blacklist; see http://www.chromium.org/administrators/policy-list-3#URLBlac...
Re:URL to PDF Microservice by jotto on Thursday October 05, 2017 @06:27PM (#15413037)
By default: if Headless Chrome hits a redirect to a file:// it returns: net::ERR_UNSAFE_REDIRECT

window.location.href = 'file:///' will return console error: "Not allowed to load local resource"