by defunkt · 15y ago · 0 comments
If someone knows a way around this limitation, or a simpler webserver to require / embed, I would be thrilled. But so far this is the best I've found.
You'd need to tell users to enable file access for the extension though chrome://extensions/, since that isn't enabled by default and users have to opt into it. I also don't know if there is a way to get the current user's homedir without hardcoding it.
Also: you're being super careful to not allow arbitrary reading of the filesystem, right? A good sanity check would be to ensure that realpath() of any file served is under ~/.js before handing it off.