United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-7179600 : Attempting to print from an unsigned applet causes multiple print access Security Dialogs to appear

Details
Type:
Bug
Submit Date:
2012-06-25
Status:
Closed
Updated Date:
2013-12-03
Project Name:
JDK
Resolved Date:
2012-07-04
Component:
deploy
OS:
windows_xp
Sub-Component:
deployment_toolkit
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
7u4
Fixed Versions:

Related Reports
Backport:
Relates:
Relates:

Sub Tasks

Description
When attempting to print from the wordle.net applet (very popular Java based applet), the Security Warning dialog (attached) shows multiple times.  On my Win7 machine, it shows twice (two items in the printer dropdown), and on my Mac it shows four times (four printers installed).  Not sure if that's a coincidence or not.  

Steps to reproduce:
1) go to http://wordle.net
2) Click on one of the examples
3) Applet loads
4) Click the Print... button below the graphic
5) Security warning appears (expected)
6) Click OK (but do not click "Always allow"
7) A second security warning dialog appears that is identical to the first.
8) Keep hitting OK until an actual print dialog is displayed.

This might be related to the fix for 7152028

                                    

Comments
Verified with jre8 b118 on win7 x86.
                                     
2013-12-03
regression_test_src:http://sqe-hg.us.oracle.com/hg/index.cgi/testbase/javase/functional/8/deployment2/file/55cf37386d83/new_framework/tests/common/UserDecisionOption/src/UserDecisionOption_AppletTag_Test.java
testUDO_medium_unsigned_AccessResource_jApplet entry.
                                     
2013-12-03
EVALUATION

Added code to always cache answer per applet session. Filed 7181300 for future work.
                                     
2012-07-03
EVALUATION

This happens because applet actually makes multiple calls to select printer, create job, etc.
They all require permission to use printer.

I am not clear on the role of checkbox here. According to current implementation it grants access to the printer 
to the current applet session only. And without checkbox we will ask every single time.

This does not seem right. Perhaps checkbox is intended to grant permissions to this applet permanently and 
without checkbox we need to grant them for the session?
                                     
2012-07-02
SUGGESTED FIX

Security Warning for printer access should only appear once per session for an applet, unless the user click the Always trust dialog box, and then it won't appear next session.
                                     
2012-06-25



Hardware and Software, Engineered to Work Together