Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8032919

sun.lwawt.macosx.CEmbeddedFrame breaks applet sandbox

XMLWordPrintable

    • os_x

      FULL PRODUCT VERSION :
      Java 1.7.0_51 (Oracle Corporation)
      Java HotSpot(TM) 64-Bit Server VM 24.51-b03 (Oracle Corporation)


      ADDITIONAL OS VERSION INFORMATION :
      Mac OS X 10.8.3 (x86_64)


      EXTRA RELEVANT SYSTEM CONFIGURATION :
      Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/536.28.10 (KHTML, like Gecko) Version/6.0.3 Safari/536.28.10


      A DESCRIPTION OF THE PROBLEM :
      When getting focus, sun.lwawt.macosx.CEmbeddedFrame.handleFocusEvent tries to access the system clipboard which throws a security exception when in the applet sandbox


      REGRESSION. Last worked in version 7u45

      ADDITIONAL REGRESSION INFORMATION:
      It worked fine when applets didn't *require* security manifest attributes and none were given.
      It works fine on Windows when in applet sandbox with 1.7.0_51



      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      Error: java.security.AccessControlException: access denied ("java.awt.AWTPermission" "accessClipboard")
      at java.security.AccessControlContext.checkPermission(AccessControlContext.java:372)
      at java.security.AccessController.checkPermission(AccessController.java:559)
      at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
      at sun.plugin2.applet.AWTAppletSecurityManager.checkPermission(Unknown Source)
      at java.lang.SecurityManager.checkSystemClipboardAccess(SecurityManager.java:1390)
      at sun.lwawt.LWToolkit.getSystemClipboard(LWToolkit.java:483)
      at sun.lwawt.macosx.CEmbeddedFrame.handleFocusEvent(CEmbeddedFrame.java:128)
      at sun.plugin2.main.client.PluginEmbeddedFrame.synthesizeFocusEvent(Unknown Source)
      at sun.plugin2.main.client.PluginEmbeddedFrame.synthesizeEvent(Unknown Source)
      at sun.plugin2.main.client.PluginMain$6.run(Unknown Source)
      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
      at java.awt.EventQueue.access$200(EventQueue.java:103)
      at java.awt.EventQueue$3.run(EventQueue.java:694)
      at java.awt.EventQueue$3.run(EventQueue.java:692)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
      at my-applet.dispatchEvent
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)


      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      In the manifest, declare the applet to need all-permissions (which defies the purpose of the sandbox)

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: