Join GitHub today
--disable-local-file-access is ignored on Windows when using invalid URLs #1639
On Windows, 0.12.1 x64 Dev and Windows 0.11.x x64, the flag --disable-local-file-access appears to be ignored. The command line issued was:
C:\Program Files (x86)\wkhtmltopdf\bin>wkhtmltopdf.exe --disable-local-file-access c:\regvercheck.txt c:\temp\blah2.pdf
which produces a file c:\temp\blah2.pdf rather than error or access denied type message.
My dev machine is Win 7 pro x64 running with admin rights. Fresh install of wkhtmltopdf 0.12.1 dev.
Excellent application BTW
I think you've got the wrong idea: if you read the command-line help, it says:
so the first file will always get processed.
This is still an issue actually. I am processing a remote file on Windows which contains an img tag which its source is a local file but in the following format: c:\temp\myphoto.jpg. The image still shows up in the PDF even with the --disable-local-file-access active.
It gives the following warning though:
This could be a security issue in case someone is converting remote / untrusted html files.
<html> <head> </head> <body> <a href="#"><img src="file:///D:/sites/web/wordpress/wp-content/uploads/2014/05/IMG_3561.jpg" align="left" width="140" height="140"></a> <a href="#"><img src="D:\sites\web\wordpress/wp-content/uploads/2014/05/IMG_3561.jpg" align="left" width="140" height="140"></a> </body> </html>
Output looks like this: