summaryrefslogtreecommitdiff
path: root/net-p2p/freenet/files/strip-openjdk-check.patch
diff options
context:
space:
mode:
Diffstat (limited to 'net-p2p/freenet/files/strip-openjdk-check.patch')
-rw-r--r--net-p2p/freenet/files/strip-openjdk-check.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/net-p2p/freenet/files/strip-openjdk-check.patch b/net-p2p/freenet/files/strip-openjdk-check.patch
new file mode 100644
index 0000000..08e0015
--- /dev/null
+++ b/net-p2p/freenet/files/strip-openjdk-check.patch
@@ -0,0 +1,46 @@
+--- src/freenet/node/Node.java 2010-07-17 02:53:39.633185065 +0200
++++ src/freenet/node/Node.java.new 2010-07-17 02:58:31.246061950 +0200
+@@ -3726,43 +3726,6 @@
+
+ boolean isOpenJDK = false;
+
+- if(jvmName.startsWith("OpenJDK ")) {
+- isOpenJDK = true;
+- if(javaVersion.startsWith("1.6.0")) {
+- String subverString;
+- if(jvmVersion.startsWith("14.0-b"))
+- subverString = jvmVersion.substring("14.0-b".length());
+- else if(jvmVersion.startsWith("1.6.0_0-b"))
+- subverString = jvmVersion.substring("1.6.0_0-b".length());
+- else
+- subverString = null;
+- if(subverString != null) {
+- int subver;
+- try {
+- subver = Integer.parseInt(subverString);
+- } catch (NumberFormatException e) {
+- subver = -1;
+- }
+- if(subver > -1 && subver < 15) {
+- File javaDir = new File(System.getProperty("java.home"));
+-
+- // Assume that if the java home dir has been updated since August 11th, we have the fix.
+-
+- final Calendar _cal = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
+- _cal.set(2009, Calendar.AUGUST, 11, 0, 0, 0);
+- if(javaDir.exists() && javaDir.isDirectory() && javaDir.lastModified() > _cal.getTimeInMillis()) {
+- System.err.println("Your Java appears to have been updated, we probably do not have the XML bug (http://www.cert.fi/en/reports/2009/vulnerability2009085.html).");
+- } else {
+- System.err.println("Old version of OpenJDK detected. It is possible that your Java may be vulnerable to a remote code execution vulnerability. Please update your operating system ASAP. We will not disable plugins because we cannot be sure whether there is a problem.");
+- System.err.println("See here: http://www.cert.fi/en/reports/2009/vulnerability2009085.html");
+- clientCore.alerts.register(new SimpleUserAlert(false, l10n("openJDKMightBeVulnerableXML"), l10n("openJDKMightBeVulnerableXML"), l10n("openJDKMightBeVulnerableXML"), UserAlert.ERROR));
+- }
+-
+- }
+- }
+- }
+- }
+-
+ if(logMINOR) Logger.minor(this, "JVM vendor: "+jvmVendor+", JVM name: "+jvmName+", JVM version: "+javaVersion+", OS name: "+osName+", OS version: "+osVersion);
+
+ if((!isOpenJDK) && (jvmVendor.startsWith("Sun ") || (jvmVendor.startsWith("The FreeBSD Foundation") && jvmSpecVendor.startsWith("Sun ")) || (jvmVendor.startsWith("Apple ")))) {