Block File System Browsing

User Help for Mozilla Firefox
simonmorley
Posts: 4
Joined: July 28th, 2007, 8:09 am

Block File System Browsing

Post by simonmorley »

Hi,

We're developing a kiosk based on firefox 2 - so far, we've got it pretty well locked down, but are struggling with the file system browsing.

How is it possible to prevent users from accessing / and looking through the hd?

Thanks in advance,

Simon
User avatar
the-edmeister
Posts: 32249
Joined: February 25th, 2003, 12:51 am
Location: Chicago, IL, USA

Post by the-edmeister »

A mind is a terrible thing to waste. Mine has wandered off and I'm out looking for it.
simonmorley
Posts: 4
Joined: July 28th, 2007, 8:09 am

Post by simonmorley »

Thanks for the answer.

Second link not working though.

The first kiosk for museum looks great, although it's apparently not compatible with firefox!

Have tried rkiosk, but there's a massive problem with the extension. If you open a popup window, it completely takes over the screen - no close button - very irritating and don't know how to solve. Have disabled javascript, but the apps we're running need that.

Am already using all the other extensions including another one, stealther.

Thanks,

Simon
User avatar
dickvl
Posts: 54145
Joined: July 18th, 2005, 3:25 am

Post by dickvl »

Maybe remove the file protocol key in the registry:
HKEY_CLASSES_ROOT\file

http://kb.mozillazine.org/Network.proto ... rotocol%29
simonmorley
Posts: 4
Joined: July 28th, 2007, 8:09 am

Post by simonmorley »

Hi,

have tried that with no success. Did find this post:

http://forums.mozillazine.org/viewtopic ... ight=kiosk

However, it doesn't work for version 2. If I could find the navigator.js I might be able to do it, but so far, no luck.

Simon
simonmorley
Posts: 4
Joined: July 28th, 2007, 8:09 am

Post by simonmorley »

I've done it!

Using the above post as a guide, I located the file "browser.js" in browser.jar and added the text:

if (url.match(/^file:/) || url.match(/^\//) || url.match(/^resource:/) || url.match(/^about:/))
{
alert("Access to this protocol has been disabled!");
exit
}

All seems great now,

Simon
cblue
Guest

Post by cblue »

Where is the browser.js did you put the code?
simonmorley
Posts: 4
Joined: July 28th, 2007, 8:09 am

Post by simonmorley »

Sorry, just seen your post. I put the above around line 1755:

function BrowserLoadURL(aTriggeringEvent, aPostData) {
var url = gURLBar.value;
if (url.match(/^file:/) || url.match(/^\//) || url.match(/^resource:/) || url.match(/^about:/))
{
alert("Access to this protocol has been disabled!");
exit
}

good luck
I need help
Guest

Post by I need help »

do you have to recompile this file or just add the code and save it?
User avatar
trolly
Moderator
Posts: 39851
Joined: August 22nd, 2005, 7:25 am

Post by trolly »

Just add and save.
JAR files are simply renamed zip files, so rename it to .ZIP, unpack it, modify the browser.js file and repack and rename it.
Think for yourself. Otherwise you have to believe what other people tell you.
A society based on individualism is an oxymoron. || Freedom is at first the freedom to starve.
Constitution says: One man, one vote. Supreme court says: One dollar, one vote.
FF3.5
Guest

Re: Block File System Browsing

Post by FF3.5 »

Hi, I tried to do this in Firefox 3.5, but I can not find the BrowserLoadURL function.
How should I block about:config and file system browsing in firefox 3.5?

Thanks in advance
binarytroy
Guest

Re: Block File System Browsing

Post by binarytroy »

I am also looking for information on how to block File Browsing and About:Config in Firefox 3.5 (Windows XP)
Thanks guys!
binarytroy
Guest

Re: Block File System Browsing

Post by binarytroy »

Hey guys still hunting for a resolution for this issue in Firefox 3.5
Thanks!
young_einstein
Guest

Re: Block File System Browsing

Post by young_einstein »

Anonymous wrote:Hey guys still hunting for a resolution for this issue in Firefox 3.5
Thanks!


Same here ...
User avatar
trolly
Moderator
Posts: 39851
Joined: August 22nd, 2005, 7:25 am

Re: Block File System Browsing

Post by trolly »

Is the browser.js file no more in browser.jar?
Think for yourself. Otherwise you have to believe what other people tell you.
A society based on individualism is an oxymoron. || Freedom is at first the freedom to starve.
Constitution says: One man, one vote. Supreme court says: One dollar, one vote.
Post Reply