NanoGoat
[org.ibex.core.git] / src / org / ibex / Platform.java
index 70d368b..4b110a6 100644 (file)
@@ -49,6 +49,7 @@ public abstract class Platform {
                 else if (os_name.startsWith("Linux")) platform_class = "Linux";
                 else if (os_name.startsWith("SunOS")) platform_class = "Solaris";
                 else if (os_name.startsWith("Solaris")) platform_class = "Solaris";
+                else if (os_name.startsWith("Darwin")) platform_class = "Darwin";
                 else platform_class = "X11";
             }
             else if (!version.startsWith("1.0") && !version.startsWith("1.1")) platform_class = "Java2";
@@ -78,7 +79,7 @@ public abstract class Platform {
                 Log.info(Platform.class, e);
             }
 
-            Log.diag(Platform.class, "Ibex VM detection:   vendor = " + vendor);
+            Log.diag(Platform.class, "Ibex VM detection:  vendor = " + vendor);
             Log.diag(Platform.class, "                   version = " + version);
             Log.diag(Platform.class, "                        os = " + os_name + " [version " + os_version + "]");
             Log.diag(Platform.class, "                  platform = " + platform.getDescriptiveName());
@@ -166,7 +167,7 @@ public abstract class Platform {
     public static boolean isCaseSensitive() { return platform._isCaseSensitive(); }
     protected boolean _isCaseSensitive() { return true; }
 
-    /** returns an InputStream to the builtin ibex archive */
+    /** returns an InputStream to the builtin xwar */
     public static InputStream getBuiltinInputStream() { return platform._getBuiltinInputStream(); }
     protected InputStream _getBuiltinInputStream() {return getClass().getClassLoader().getResourceAsStream("org/ibex/builtin.jar");}
 
@@ -228,6 +229,8 @@ public abstract class Platform {
             return;
         }
         // check the URL for well-formedness, as a defense against buffer overflow attacks
+        // FIXME check URL without using URL class
+        /*
         try {
             String u = url;
             if (u.startsWith("https")) u = "http" + u.substring(5);
@@ -236,6 +239,7 @@ public abstract class Platform {
             Log.info(Platform.class, "URL " + url + " is not well-formed");
             Log.info(Platform.class, e);
         }
+        */
         Log.info(Platform.class, "newBrowserWindow, url = " + url);
         platform._newBrowserWindow(url);
     }