Uploaded image for project: 'Nuxeo Drive '
  1. Nuxeo Drive
  2. NXDRIVE-1682

Make the updater more robust against inappropriate server response

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.1.0
    • Fix Version/s: 4.1.3
    • Component/s: Application update

      Description

      Error

      If the server returns an empty string, BaseUpdater.versions will be set to None and thus trying to get the update status will fail:

      TypeError: argument of type 'NoneType' is not iterable
        File "nxdrive\engine\workers.py", line 171, in run
        File "nxdrive\engine\workers.py", line 252, in _execute
        File "nxdrive\updater\base.py", line 334, in _poll
        File "nxdrive\updater\base.py", line 214, in _get_update_status
        File "nxdrive\updater\utils.py", line 105, in get_update_status
      

      In fact, to reproduce:

      >>> import yaml
      >>> yaml.safe_load("")
      >>> versions = yaml.safe_load("")
      >>> versions is None
      True
      

      Sentry Issue: NUXEO-DRIVE-186

      Fix

      Enforce versions to be an empty dict in BaseUpdater._fetch_versions().

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 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 - 30 minutes
                30m