<div dir="ltr"><div><div>Oh... OK. So I misunderstood (mis-guessed) the spec. I see!<br><br></div>So I'll have to put an unsigned applet there to have it sandboxed.<br><br></div>Thanks for investigating,<br>Stefan<br></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Mar 17, 2014 at 5:58 PM, Andrew Azores <span dir="ltr"><<a href="mailto:aazores@redhat.com" target="_blank">aazores@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">>Hi folks,<br>
><br>
>here is something really really weird. I have this applet:<br>
><a href="http://tinybrain.de:8080/tb-applet/chat-applet.php" target="_blank">http://tinybrain.de:8080/tb-applet/chat-applet.php</a><br>
><br>
>with this source code (you can verify!):<br>
><br>
><applet id="theapplet" code="net.luaos.tb.tb16.ComputerChatApplet.class"<br>
>width="100%" height="300" alt="Java Applet" archive="magic.jar?3195969"><br>
>  <!--<param name="permissions" value="all-permissions" />--><br>
></applet><br>
></div><br>
><br>
>Clearly, all-permissions is just a comment. I also get no security dialog<br>
>or anything, so it's a SANDBOXED applet.<br>
<br>
</div>How are you determining that it's sandboxed? What version of ITW are you running, and what are your settings in Extended Applet Security (check with itweb-settings)? When I run your applet, I get a dialog informing me that it's a signed applet but that it couldn't be verified - but signed, nonetheless. As far as I can tell based on what I'm seeing in the setup of your applet, this is correct.<br>

<div class=""><br>
><br>
>However, I can clearly see it accessing my disk. I enter "hello" in the<br>
>chat field, and instantly, a file in ~/.tinybrain is created on my<br>
>partition.<br>
><br>
>By an untrusted applet.<br>
><br>
>How's it possible?<br>
><br>
>Process dump:<br>
><br>
>stefan     746 32001  0 17:22 ?        00:00:00<br>
>/usr/lib/firefox/plugin-container<br>
>/usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386/IcedTeaPlugin.so -greomni<br>
>/usr/lib/firefox/omni.ja -appomni /usr/lib/firefox/browser/omni.ja -appdir<br>
>/usr/lib/firefox/browser 32001 true plugin<br>
>stefan     754   746  1 17:22 ?        00:00:04<br>
>/usr/lib/jvm/java-7-openjdk-i386/bin/java<br>
>-Xbootclasspath/a:/usr/share/icedtea-web/netx.jar:/usr/share/icedtea-web/plugin.jar<br>
>-classpath /usr/lib/jvm/java-7-openjdk-i386/lib/rt.jar<br>
>sun.applet.PluginMain<br>
>/tmp/icedteaplugin-stefan/746-icedteanp-plugin-to-appletviewer<br>
>/tmp/icedteaplugin-stefan/746-icedteanp-appletviewer-to-plugin<br>
><br>
>Note: I also use signed applets, using the same .jar, on other pages. Maybe<br>
>that slips through to this applet? But still, it's totally out of spec that<br>
>this applet can write stuff to disk, or is it?<br>
<br>
</div>This sounds to me like the root of the confusion here. If your applet resides within a signed JAR, it is treated as if it is signed, unless your applet tag in the HTML specifies that it should be sandboxed anyway [0]. ``If the permissions parameter is not present, signed applets default to "all-permissions" and unsigned applets default to "sandbox".'' If you want this applet to only be able to run with sandbox permissions, without having to specify this in the html, then you need to put it in its own unsigned JAR.<br>

<br>
><br>
>Cheers,<br>
>Stefan<br>
<br>
[0] <a href="http://docs.oracle.com/javase/tutorial/deployment/applet/html.html" target="_blank">http://docs.oracle.com/javase/tutorial/deployment/applet/html.html</a><br>
<br>
Thanks,<br>
<br>
Andrew A<br>
</blockquote></div><br></div>