Uploaded image for project: 'Nuxeo Python Client'
  1. Nuxeo Python Client
  2. NXPY-204

Fix data leak issue with mutable model properties

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 4.1.1
    • Component/s: Upload

      Description

      Problem

      Models have properties defined at the class level (not the instance level like it would be done inside an __init__() method). Several of them are mutables: list or dict in our use case.

      When creating a model, defaults values are retrieved from class attributes, and if one was already defined by a previous operation, the new model will "benefit" of the same value. It introduces silly issues like the one seen in NXDRIVE-2479.

      Solution

      For mutable properties, instead of trying to use them directly, we must use a copy of them to prevent data leak.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mschoentgen Mickaël Schoentgen
                Reporter:
                mschoentgen Mickaël Schoentgen
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 hours
                  3h

                    PagerDuty