Bug 26607 - SGI Java security error
Summary: SGI Java security error
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: kjava (show other bugs)
Version: unspecified
Platform: Compiled Sources IRIX
: NOR normal
Target Milestone: ---
Assignee: George Staikos
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-06-02 18:33 UTC by nicoya
Modified: 2003-02-19 00:20 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nicoya 2001-06-02 18:29:29 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           kjava
Version:           KDE 2.1.1 
Severity:          normal
Installed from:    Compiled From Sources
Compiler:          gcc version 2.95.3 20010315 (release)
OS:                Irix
OS/Compiler notes: SGI/Sun JavaVM 1.3 installed

Upon loading any java applet on my SGI in Konqueror the java console pops up and reports:

Java VM version: JavaVM-1.3
Java VM vendor:  Silicon Graphics Inc.
ERROR: This version of Java is not supported for security reasons.
Please use Java version 1.2 or higher.

The same java applets work fine under netscape 4.75.

cayes:~$ /usr/java/bin/java -version
java version "JavaVM-1.3"
Java(TM) 2 Runtime Environment Standard Edition (build 1.3)
Classic VM (build JavaVM-1.3 build 1.3 green threads mipsjit)
cayes:~$ uname -a
IRIX64 cayes 6.5 01101246 IP28


(Submitted via bugs.kde.org)
Comment 1 nicoya 2001-08-19 18:56:51 UTC
This bug is still present in KDE 2.2 and upon further investigation
appears to stem from the code at:

kdelibs-2.2/khtml/java/org/kde/kjas/server/Main.java:51

This line attempts to extract the numerical portion of the version string
"JavaVM-1.3" by extracting the *first* 3 characters and gets "Jav" instead
of "1.3".

The solution would appear to be to make the code that extracts the
numerical version string a little more sophisticated to allow for the
version to appear anywhere within the string.


Cheers - Tony 'Nicoya' Mantler :)


--
Tony "Nicoya" Mantler - Renaissance Nerd Extraordinaire - nicoya@apia.dhs.org
Winnipeg Manitoba Canada           --           http://nicoya.feline.pp.se/
Comment 2 thebeast 2003-01-19 07:02:51 UTC
still present?
Comment 3 nicoya 2003-01-19 08:00:44 UTC
Unfortunatley my SGI is out of commission for the moment, so I won't be 
able to verify this. Sorry.


Cheers - Tony 'Nicoya' Mantler :)
Comment 4 George Staikos 2003-02-14 07:24:38 UTC
This does look to be a valid bug. The code in question is: 
 
        Main.debug( "JVM version = " + System.getProperty( "java.version" ) ); 
        String version = System.getProperty("java.version").substring( 0, 3 ); 
        Main.debug( "JVM numerical version = " + version ); 
 
The question is, how do we get a working VM to test a possible fix?  I guess the fix would be to 
remove everything up to the first numeral, and then parse the substring from there. 
 
Comment 5 George Staikos 2003-02-19 00:20:18 UTC
Subject: kdelibs/khtml/java

CVS commit by staikos: 

Better late than never!  Well, at least we fixed this while IRIX still exists.
Please test on IRIX if anyone still has this running with KDE.

CCMAIL: 26607-done@bugs.kde.org


  M +171 -173  kjava.jar   1.48
  M +4 -0      org/kde/kjas/server/Main.java   1.34


--- kdelibs/khtml/java/org/kde/kjas/server/Main.java  #1.33:1.34
@@ -66,4 +66,8 @@
         Main.debug( "JVM version = " + System.getProperty( "java.version" ) );
         String version = System.getProperty("java.version").substring( 0, 3 );
+        // Hack for SGI Java2 runtime
+        if (version == "Jav") {     // Skip over JavaVM-  (the first 7 chars)
+            version = System.getProperty("java.version").substring(7,3);
+        }
         Main.debug( "JVM numerical version = " + version );
         try