Squid causes security exception in Java Applet ......

From: Thomas Leitner <tom@dont-contact.us>
Date: Fri, 27 Sep 1996 17:15:02 +0200 (MET DST)

-----BEGIN PGP SIGNED MESSAGE-----

Hi,

We experience a very peculiar behaviour of Netscape 3.0: When our Java
applet is run with a proxy (SQUID 1.0.12) turned on, we get a security
exception. When the proxy is turned off, no exception is raised.

This is rather strange and what's still stranger is that Netscape 2.0
does not show this behaviour!! We get no exception at all!

This is the part of the code which accesses an URL without our applet:

            file = "images/files_4.dat" ;
            url = new URL (applet.getCodeBase(), file);
            URLConnection urlConnection = url.openConnection();
            urlConnection.setUseCaches(false);
            InputStream inputStream = urlConnection.getInputStream();
            dataInputStream = new DataInputStream(inputStream);

            [...]
            while (true) {
                temp = dataInputStream.readLine();

This is the exception:

# Security Exception:
socket.connect:www.dummy.com->www.dummy.com
# Security Exception:
socket.connect:www.dummy.com->www.dummy.com
# Applet exception: security violation: security.socket.connect:
www.dummy.com->www.dummy.com
netscape.applet.AppletSecurityException: security.socket.connect:
www.dummy.com->www.dummy.com
  at netscape.applet.AppletSecurity.checkConnect(AppletSecurity.java:454)
  at netscape.applet.AppletSecurity.checkConnect(AppletSecurity.java:398)
  at netscape.applet.AppletSecurity.checkURLConnect(AppletSecurity.java:475)
  at netscape.net.URLConnection.connect(URLConnection.java:70)
  at netscape.net.URLConnection.getInputStream(URLConnection.java:188)
  at WLoop2.GetFileNames(WLoop2.java:1284)
  at WLoop2.init(WLoop2.java:685)
  at netscape.applet.EmbeddedAppletFrame.run(EmbeddedAppletFrame.java:323)
  at java.lang.Thread.run(Thread.java:296)

Anyone any idea what we could do about that?

So who is the perpetrator: Squid, Netscape, JDK or do we do something
wrong in the above code fragment?

Thanks -- Tom

- --
- --------------------------------------------------------------------------
T o m L e i t n e r Dept. of Communications
                                            Graz University of Technology,
e-mail : tom@finwds01.tu-graz.ac.at Inffeldgasse 12
Phone : +43-316-873-7455 A-8010 Graz / Austria / Europe
Fax : +43-316-463-697
Home page : http://wiis.tu-graz.ac.at/people/tom.html
PGP public key on : ftp://wiis.tu-graz.ac.at/pgp-keys/tom.asc or send
mail with subject "get Thomas Leitner" to pgp-public-keys@keys.pgp.net
- --------------------------------------------------------------------------

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: latin1

iQCVAwUBMkvveNEZPSczow+VAQH5HQQAvy3Ad8GXzSPODbNJAGKgSgWbMzODNw+r
5MWJNVOoIsVGeQs88/Ua8y+DpJ7oAtgGFEmjysVdd6mt3lJGZSvgQBTr91K6rdI8
28oz95NX+NkWV39LrUjHipaCjAvzd+uEfFtA+yVzl/LNosqO/PeAmgMdXo9TOF6T
M61MPPviPBs=
=2j52
-----END PGP SIGNATURE-----
Received on Fri Sep 27 1996 - 08:16:28 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:33:05 MST