Closed Bug 14711 Opened 25 years ago Closed 11 years ago

JavaScript to Java SecurityApplet test freezes apprunner.

Categories

(Core Graveyard :: Java: OJI, defect, P3)

x86
Windows NT
defect

Tracking

(Not tracked)

RESOLVED INCOMPLETE
Future

People

(Reporter: leilag, Unassigned)

References

Details

(Keywords: hang, Whiteboard: [nsbeta2-][nsbeta3-])

Attachments

(1 file)

Using my Sept. 14 Mozilla build and jdk1.3 on Windows NT.
Added the npjava*.dlls to bin/plugins directory.

To reproduce,
 - Bring up LiveConnect/html/SecurityApplet.html
 - Click "Read Local File" or "Write Local File" or "Delete Local File" buttons.

   Notice that apprunner will freeze.
Status: NEW → ASSIGNED
Target Milestone: M12
Control does not return from the show method of java.io.FileDialog. Here is
a summary of the code in the Java Plugin that gets us there:

1. This method is called through JNI.

SecureInvocation.CallMethod()
{
    ProtectionDomain[] = new ProtectionDomain[1];
    domains[0] = new JavaScriptProtectionDomain(securityContext);
    AccessControlContext context = new AccessControlContext(domains);
    …
    return AccessController.doPrivileged(new PrivilegedCallMethodAction(
                                               method,obj,args), context);
}

2. doPrivileged calls the run method on PrivilegedCallMethodAction.

PrivilegedCallMethodAction.run()
{
    return method.invoke(obj,args);
}

3. The applet method, doFileRead is called via method.invoke. A new FileDialog
object is created, but the show method never returns control. No exception is
thrown.

SecurityApplet.doFileRead() {

    dlg = new FileDialog(…);
    dlg.show(); // does not show dialog or return control to caller.

}

Somebody in the Java Platform group should probably take a look at this.
Target Milestone: M12 → M14
Contacted JDK folks at Sun for more info about a possible Java Plug-In problem
here.  The preliminary response was that this problem sounds like one that was
previously seen in the Java Plug-In implementation for Internet Explorer.  If
so, a similar fix could be applied to JPI (Java Plug-In).

More status to follow; this bug probably won't be closed for a couple of
milestones, if it is indeed in JPI.  It will take some time for the JDK folks to
get to a full evaluation, considering where they are in their own JDK release
cycle (i.e., not much time to evaluate these bugs at the moment).
Re-setting the milestone on this one, and copying Stanley Ho so that he's aware 
of the problem.  We'll start worrying about security issues after Beta 1.
Target Milestone: M14 → M16
Keywords: nsbeta2
This may turn out to be a security problem, which is being worked on for M16. 
Will have Jeff Dyer look at this bug when he has completed security work.
Also nominating for Beta2, since security is the main feature going into OJI for
Beta 2 and this should be taken care of by then.
Putting on [nsbeta2+] radar for beta2 fix. 
Whiteboard: [nsbeta2+][5/16]
Putting on [nsbeta2-] radar. Sun would need to take care of this.
Whiteboard: [nsbeta2+][5/16] → [nsbeta2-]
M16 has been out for a while now, these bugs target milestones need to be 
updated.
Moved Target milestone to M18.

Target Milestone: M16 → M18
Per OJI meeting today, assigning to Jeff.
Assignee: drapeau → jeff.dyer
Status: ASSIGNED → NEW
This bug should be fixed when Java plugin learns how to use  
nsScriptSecurityManager to check permissions. No ETA yet.
Status: NEW → ASSIGNED
Blocks: 32960
Nom. nsbeta3 in crash category. (We know it freezes apprunner; anyone know if
the same is true in Mozilla or N6?)
Keywords: crash, nsbeta3
Reassign to stanley.
Assignee: jeff.dyer → stanley.ho
Status: ASSIGNED → NEW
Per Stanley's request, marking future.
Target Milestone: M18 → Future
Status: NEW → ASSIGNED
marking nsbeta3- per last comment
Whiteboard: [nsbeta2-] → [nsbeta2-][nsbeta3-]
Tried this with mozilla build 09/22 (around PR3 branch time) wiht new PR3 Jre
bits (09/22).

Still hangs on NT/98.
Just for information

Checked on Solaris sparc 2.8 with FCS bits of Java Plugin 1.3.0_01
and FCS package of Netscape 6 for Solaris dated (12/4)
It does not hang.
Keywords: crashfreeze
Keywords: freezehang
With 2001052904 nigthly build, under WinNT SP4 and jdk1.3.0_02 this testcase
just crashed Mozilla.
1)Start Mozilla
2)Load SecurityApplet.html
3)Click on any button(read, write or delete)
=> Mozilla crashed with dialog "Memory at 0x000 couldn't be read"
Same build is crashed with jdk1.3.1 too.
Changed qa contact to petersen@netscape.com
QA Contact: paw → petersen
04;4;Avril
Assignee: stanley.ho → nobody
QA Contact: chrispetersen → java.oji
Status: ASSIGNED → NEW
Product: Core → Core Graveyard
Mass-closing bugs in the "OJI" component: OJI plugin integration was replaced with npruntime long ago, and these bugs appear to be irrelevant now. If there is in fact a real bug that remains, please file it new in the "Core" product, component "Plug-ins".
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: