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

infinite recursion during session deserialization with redis

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 8.5.2, 8.6.1
    • Fix Version/s: 8.6.2
    • Component/s: Databind 2
    • Security Level: Jimmy
    • gh.sprint.customfield.default.name:
      ZK 8.6.2 S2

      Description

      Steps to Reproduce

      happens in a zkspringboot application when using redis session caching

      Current Result

      deserializing a BinderImpl leads to an infinite recursion (StackOverFlow error) when static resources are loaded e.g. the progress animation

      http://robert-nb:8080/zkau/web/4ce7da9a/zul/img/misc/progress-72.gif

      Expected Result

      no error

      Debug Info

      redis' eager session serialization mechanism will deserialize the session from the internal storage every time request.getSession() is called

      indirectly this happens inside the BinderImpl.readObject method -> calling BinderImple.init() -> calling WebApps.getCurrent() which internally calls again request.getSession(), restarting the loop

      side effects during deserialization as in this case can have hard to trace consequences.

      Root Cause

      side effect of ZK-1148
      https://github.com/zkoss/zk/commit/6cb74fa85dffde9d247d177a6fa14e831bc4b3c2#diff-65189fcf1cc3be918b3654daf8895419R301

      Workaround

        Attachments

          Activity

            People

            • Assignee:
              rudyhuang rudyhuang
              Reporter:
              cor3000 cor3000
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 4 hours Original Estimate - 4 hours
                4h
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 6 hours
                6h