Bug 2721937 change the way PutInROT property is used so that applets no longer throw security violation
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
<HTML>
|
||||
<BODY>
|
||||
<!-- --------- -->
|
||||
<h2>JACOB 1.15 M1</h2>
|
||||
<h2>JACOB 1.15 M2</h2>
|
||||
<h3>What's New</h3>
|
||||
<ul>
|
||||
<li>
|
||||
MS Libraries are now statically linked using /MT instead of /MD to reduce issues library compatability issues, especially on older platforms.
|
||||
MS Libraries are now statically linked using /MT instead of /MD to
|
||||
reduce issues library compatibility issues, especially on older platforms.
|
||||
The VC++ redistributable library no longer needs to be installed
|
||||
as a stand alone product.
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Tracked Changes</h3>
|
||||
@@ -13,6 +16,14 @@
|
||||
<tr>
|
||||
<td colspan="2"><b>Bugs</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="13%" valign="top">2721937</td>
|
||||
<td width="87%" valign="top">System.getProperties call caused security exception in applet.
|
||||
<i>com.jacob.includeAllClassesInROT</i> now acts as master switch for class/ROT control.
|
||||
This change also has the side benefit that the PutInROT property is not
|
||||
checked on every object creation for users who run in the standard
|
||||
<i>all classes in ROT</i> mode. (M2)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="13%" valign="top"> </td>
|
||||
<td width="87%" valign="top"> </td>
|
||||
|
||||
@@ -71,14 +71,21 @@ should be fixed in some future release, fix method and time not yet determined.
|
||||
<p>
|
||||
<hr>
|
||||
<h2>Microsoft Visual C++ library dependencies.</h2>
|
||||
<p>
|
||||
Jacob 1.15 is build with VC++ 2005 staticly linked into the DLL. This
|
||||
removes the need for a separate msvcr80.dll installation.
|
||||
</p>
|
||||
<p>
|
||||
Jacob 1.13 is built with VC++ 2005 that creates a dependency on msvcr80.dll.
|
||||
Windows XP and later seem to already include the necessary components.
|
||||
NT/2000 and Server/2003 require that you download the Visual C 2005 redistributable
|
||||
package, vcredist_x86.exe from the microsoft web site.
|
||||
Microsoft has a download available that supplies the necessary components.
|
||||
It is distributed as a redistributable package.
|
||||
</p>
|
||||
<p>
|
||||
If you see the following message then you probably don't have the right C++ libraries.
|
||||
</p>
|
||||
<pre>
|
||||
Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\apps\...\jacob.dll: This application has fa
|
||||
iled to start because the application configuration is incorrect. Reinstalling the application may fix this pr
|
||||
@@ -162,6 +169,20 @@ This library supports several different command line options:
|
||||
|
||||
</td></tr>
|
||||
|
||||
<tr><td> </td><td valign="top">
|
||||
<h4>com.jacob.includeAllClassesInROT</h4>
|
||||
</td><td>
|
||||
Acts as master switch for and <class_name>.PutInROT.
|
||||
This property determines if the (experimental) PutInROT property is even
|
||||
checked. It was added in version 1.15 because the property check in
|
||||
PutInROT brok applets because they are not allowed to check system properties
|
||||
at run time. com.jacob.includeAllClassesInROT is checked at class initialization
|
||||
which is allowed.
|
||||
<p>The default value of this flag is <i>true</i> which matches all behvior
|
||||
prior to 1.13 and the default behvior for 1.13 on</p>
|
||||
<p>Setting this flag to false causes Jacob to check the and <class_name>.PutInROT
|
||||
property for every Jacob object that is created.</p>
|
||||
</td></tr>
|
||||
<tr><td> </td><td valign="top">
|
||||
<h4><class_name>.PutInROT</h4>
|
||||
</td><td>
|
||||
|
||||
@@ -49,6 +49,20 @@ public abstract class ROT {
|
||||
protected static final boolean USE_AUTOMATIC_GARBAGE_COLLECTION = "true"
|
||||
.equalsIgnoreCase(System.getProperty("com.jacob.autogc"));
|
||||
|
||||
/**
|
||||
* If the code is ran from an applet that is called from javascript the Java
|
||||
* Plugin does not give full permissions to the code and thus System
|
||||
* properties cannot be accessed. They can be accessed at class
|
||||
* initialization time.
|
||||
*
|
||||
* The default behavior is to include all classes in the ROT, setting a
|
||||
* boolean here to indicate this prevents a call to System.getProperty as
|
||||
* part of the general call flow.
|
||||
*/
|
||||
protected static final Boolean INCLUDE_ALL_CLASSES_IN_ROT = Boolean
|
||||
.valueOf(System.getProperty("com.jacob.includeAllClassesInROT",
|
||||
"true"));
|
||||
|
||||
/**
|
||||
* Suffix added to class name to make up property name that determines if
|
||||
* this object should be stored in the ROT. This 1.13 "feature" makes it
|
||||
@@ -217,11 +231,15 @@ public abstract class ROT {
|
||||
* @param o
|
||||
*/
|
||||
protected static void addObject(JacobObject o) {
|
||||
// check the system property to see if this class is put in the ROT
|
||||
// the default value is "true" which simulates the old behavior
|
||||
String shouldIncludeClassInROT = System.getProperty(o.getClass()
|
||||
.getName()
|
||||
+ PUT_IN_ROT_SUFFIX, "true");
|
||||
String shouldIncludeClassInROT = "true";
|
||||
// only call System.getProperty if we are not including all classes in
|
||||
// the ROT. This lets us run with standard Jacob behavior in Applets
|
||||
// without the security exception raised by System.getProperty in the
|
||||
// flow
|
||||
if (!ROT.INCLUDE_ALL_CLASSES_IN_ROT) {
|
||||
shouldIncludeClassInROT = System.getProperty(o.getClass().getName()
|
||||
+ PUT_IN_ROT_SUFFIX, "true");
|
||||
}
|
||||
if (shouldIncludeClassInROT.equalsIgnoreCase("false")) {
|
||||
if (JacobObject.isDebugEnabled()) {
|
||||
JacobObject.debug("JacobObject: New instance of "
|
||||
|
||||
Reference in New Issue
Block a user