Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Can't get out of sandbox with MSIE 4.0!!

Posted on 1998-02-19
5
Medium Priority
?
171 Views
Last Modified: 2010-04-16
I am trying to write an applet that can read and write files on the user's local machine.  I cannot use any server-side tricks for this.  With MSIE 4.0, you are supposed to be able to sign your applet and request certain capabilities (which I am).  It appears possible (typically lousy Microsoft documentation) that you need to call the PolicyEngine.assertPermission(); function in the method if your applet when it's about to do the thing which you requested permission for (though I have tried both with & without this function).  I cannot find any way to convince MSIE to let me operate "outside the sandbox".
On the microsoft.public.java.security newsgroup, this is a common problem - either it simply doesn't work, or there is some little detail Microsoft forgot to mention!
0
Comment
Question by:ccooper
  • 3
  • 2
5 Comments
 
LVL 32

Expert Comment

by:jhance
ID: 1233154
The settings are buried down deep in the IE4.0 menus:

View>Internet Options>Security>Custom>Settings>Java Permissions>Custom>Java Custom Settings>Edit Permissions>Signed Content>Access to All Files>Enable


Whew!
0
 

Author Comment

by:ccooper
ID: 1233155
I don't think that's really the answer.  If I understand that dialog correctly, what you suggest would in effect tell MSIE that _all_ signed applets (from whichever 'zone' I'm editing) will have access to all files, whether they ask for it or not.  That's not what I wanted.  Plus, when this applet is "set loose" on the web, I really can't expect everyone to be dinking around with their security options.

As I played with it more, I think it is in fact an MSIE bug.  Turns out, if you specify the "useslibrary" param in the applet tag (so the applet is downloaded only once unless a new version becomes available), the applet forgets which privileges you asked for.  If you just use the "cabbase" tag, so it re-downloads each time, the privilege stuff seems to work (that is, the applet gets the privileges it requested, without changing the security options for MSIE itself).  I am still checking the details, but that seems to be true ...

Chris

0
 
LVL 32

Expert Comment

by:jhance
ID: 1233156
Before ANY applet will get the FILE read/write permission the user of IE must enable it.  There are 3 options for this permission: ENABLE, DISABLE, PROMPT.  If it's set to DISABLE (which is the installation default) no JAVA applet will get access to any local file.  You're correct, however, in your assertion that if you open it up to one signed applet you open it up to all.  That's the current state of Java sandbox "rules".
0
 

Author Comment

by:ccooper
ID: 1233157
Hum ... I have never entered that dialog before, so I assume the values are still at their defaults - and yet even when I load my applet from a remote web page (so I'm in the 'Internet zone'), I can get file read/write privileges simply by signing the CAB file and then doing the assertPermission.
Even if changing this value was required, it seems that setting it to 'Prompt' instead of 'Enable' would be safer!

0
 
LVL 32

Accepted Solution

by:
jhance earned 100 total points
ID: 1233158
Well, prompt vs. enable is up to you, but disable is still the default for the "Internet Zone" in IE 4.0
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This video teaches viewers about errors in exception handling.
Suggested Courses

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question