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

Liveconnect call from JS to java is failed when applet is using class attribute with latest 7u45

XMLWordPrintable

    • b09
    • Verified

        With 7u45, the call from JS to java is failed when applet is using class attribute.

        Steps to reproduce:
            1 Install latest jre7u45#224
            2 Enable trace and java console from JCP
            3 Disable OCSP/CRL check from JCP: Open JCP->Advanced->"Perform certificate revocation checks on: ": Check "Do not check (not recommended)"
            4 Load applets that using class attribute to specify applet code:
        http://sqeweb.us.oracle.com/net/sqenfs-1/export1/comp/jsn/users/crystal/DO_NOT_REMOVE_ME/jrebug/liveconnect/html/testAccessNonExistentField_Negative.html
            5 There will be an unsigned dialog shows up. Click "Run"
            6 If you don't see " PASSED : Non existent field noJavaField accessible : undefined" shown in java console, this issue is reproduced.

        Source code: http://sqeweb.us.oracle.com/net/sqenfs-1/export1/comp/jsn/users/crystal/DO_NOT_REMOVE_ME/jrebug/liveconnect/src/JS2JavaExceptionApplet.java

        Note:
        1) It works fine with 7u40 when use class attribute:
            1 Install latest jre7u40
            2 Enable trace and java console from JCP
            3 Disable OCSP/CRL check from JCP: Open JCP->Advanced->"Perform certificate revocation checks on: ": Check "Do not check (not recommended)"
            4 Load applets that using class attribute to specify applet code:
        http://sqeweb.us.oracle.com/net/sqenfs-1/export1/comp/jsn/users/crystal/DO_NOT_REMOVE_ME/jrebug/liveconnect/html/testAccessNonExistentField_Negative.html
            5 There will be an unsigned dialog shows up. Click "Run"
            6 You will see " PASSED : Non existent field noJavaField accessible : undefined" shown in java console

        2) Liveconnect call from JS to java is allowed when applet is using jar files instead of class attribute.
        steps to reproduce:
        1 Install 7u45
        2 Enable trace and java console from JCP
        3 Load an applet that using unsigned jar instead of class attribute to specify applet code:
        http://sqeweb.us.oracle.com/net/sqenfs-1/export1/comp/jsn/users/crystal/DO_NOT_REMOVE_ME/jrebug/liveconnect/html/test_JS2SJ_Unsigned_Sandbox.html
        4 In above applet, js -> unsigend java (jar) from same domain
        5 A unsigned dialog will show up. Click "Run"
        6 You will see ">>>Result is true Cause: method MixedCodeApplet.fromJS get called successfully from JS" shows up in java console(this means that JS to unsigned jar call is allowed)

              dtitov Daniil Titov (Inactive)
              wenjyang Crystal Yang (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: