LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   xss restriction, javascript - local disk (https://www.linuxquestions.org/questions/linux-security-4/xss-restriction-javascript-local-disk-723043/)

crackpipe 05-01-2009 06:42 PM

xss restriction, javascript - local disk
 
This might be obscure. I want to use my browser as a local GUI to launch local bash scripts against my local database. Using the database and the browser interface,I can index and access files on my local hard drive with advantages of 1) including metadata or whatever I want in the resultant graphical display in the browser (rather than just the file name in graphical file managers) and, 2) via html and css, results are formatted the way I desire them (instead of tty text in terminal-based bash queries). Of course, I could set-up a LAMP, but that seems like extreme overkill, more or less creating an enterprise Apache environment and CGI scripts simply to arrange data on my local hard drive. I'd like to do it simply and cleanly with just Javascript, my browser, bash scripts, and my database, all local.

Why am I asking in this forum? Staying client-side means sticking with Javascript, not PHP, since PHP is server-side. Yet Javascript xss/sandbox limitations seem to prevent using bash or otherwise accessing my local drive. If that's correct, it's a security issue that I'd like to circumvent locally, or at least know there is no way to circumvent, and relent to making a localhost LAMP. A secondary security question then arises: server stuff (Apache and CGI scripts) seem to have associated security problems running on localhost. For security and simplicity, I'd like to avoid all of that, doing everything through the browser and javascript, loading local files in the format "file:///home/foo/foobar.html", and making calls to Bash scripts where necessary to retrieve data. Can this be done?

Hope this makes sense. Thanks.


All times are GMT -5. The time now is 02:52 PM.