Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-3796

unexpectedly loaded metainfo/zk/build in zpoi.jar causes license checking failure

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 8.5.0
    • Fix Version/s: 8.5.1
    • Component/s: None
    • Security Level: Jimmy
    • Labels:
      None
    • gh.sprint.customfield.default.name:
      ZK 8.5.1 S1

      Description

      problem

      An application that contains both zk-8.5.0.jar and zpoi-3.9.7.jar, but ZK loads zpoi-3.9.7.jar/metainfo/zk/build, therefore show the error message:

      Failed to process
      Your ZK binary is being altered and may not work as expected. Please contact us at info@zkoss.org for assistance.: Error:4665b2bef

      Steps to Reproduce

      1. set breakpoint in AbstractWebApp.loadBuild()
      2. change path's value to "file:/Users/hawk/zk-1app/WEB-INF/lib/zpoi-3.9.7.jar!/metainfo/zk/build"

      Current Result

      a zpoi.jar path passes the check, so ZK will load zpoi.jar's build instead of zk.jar
      "file:/Users/hawk/zk-1app/WEB-INF/lib/zpoi-3.9.7.jar!/metainfo/zk/build".matches("(.)zk-\\d.\\.jar
      !/metainfo/zk/build") returns true

      Since class loader doesn't return an Enumeration with a fixed order in different OS, sometimes zpoi.jar is the first object we visit in the loop.

      Expected Result

      not load build in zpoi.jar

      Debug Info

      • customer's environment wildfly 10.0.0.CR5

      Root Cause

      • in (.)zk-\\d.\\.jar
        !/metainfo/zk/build
        , the dot . after \d is the root cause

      Workaround

      • remove zpoi.jar/metainfo/zk/build

        Attachments

          Activity

            People

            Assignee:
            rudyhuang rudyhuang
            Reporter:
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 hour
                1h
                Remaining:
                Time Spent - 30 minutes Remaining Estimate - 30 minutes
                30m
                Logged:
                Time Spent - 30 minutes Remaining Estimate - 30 minutes
                30m