Re:Firefox introduces PDF viewer
by DASD on Wednesday February 20, 2013 @01:44PM
(#5252354)
I thought one of the safety features of some pdf readers was the ability to disable javascript. How does that work here if this is entirely implemented in javascript? Disregard if I'm not understanding this correctly.
[ Parent
| on HN ]
Re:Firefox introduces PDF viewer
by rcthompson on Wednesday February 20, 2013 @02:14PM
(#5252557)
I believe the security feature is the ability to disable Javascript code that is included within the pdf file. A pdf reader implemented in Javascript is perfectly capable of doing that.
Re:Firefox introduces PDF viewer
by stock_toaster on Wednesday February 20, 2013 @03:00PM
(#5252894)
Not only that, but being able to render via js would (and thus avoid calling out to any plugin code) would be able to take advantage of sandboxing too I imagine.
Re:Firefox introduces PDF viewer
by pifflesnort on Thursday February 21, 2013 @09:19AM
(#5257481)
How do you evaluate the PDF's JavaScript in an interpreter that is distinct from the renderer's?
Different layers of abstraction. JavaScript embedded in a PDF probably turns up as a string after being parsed. It doesn't necessarily get eval'ed. It's turtles all the way down, until you say no.