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

Better support badly cased or unknown Portal SSO digest algorithms

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.1.0
    • Fix Version/s: 4.1.1
    • Component/s: Core

      Description

      Issue

      That code will break:

      auth = PortalSSOAuth("alice", "secure secret", digest_algorithm="MD5")
      req = Request("GET", "https://httpbin.org/get", auth=auth)
      prepared = req.prepare()
      

      It will throw that error:

      AttributeError: 'NoneType' object has no attribute 'update'
      

      Analysis

      When crafting the Portal SSO token, we check if the given digest algorithm is available in the hashlib module. But we do not take care of uppercased algorithms or even unknown ones.

        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 - 15 minutes
                  15m