Uploaded image for project: 'Libcloud'
  1. Libcloud
  2. LIBCLOUD-149

S3 signature : Content-MD5 header value case must not be lowered

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.7.1
    • Fix Version/s: 0.9.1
    • Component/s: Storage
    • Labels:
      None

      Description

      Multi-object delete calls crash with signature error because the Content-MD5 is lowered in S3Connection._get_aws_auth_param ; the string to sign as returned by AWS in the error response shows it ; moreover, nothing indicates the lower case in the AWS official documentation : http://docs.amazonwebservices.com/AmazonS3/latest/API/multiobjectdeleteapi.html

        Activity

        Hide
        fcayre Florent Cayré added a comment -

        Following code :

        if key.lower() in special_header_keys:
        special_header_values[key.lower()] = value.lower().strip()

        should probably be patched as follows :

        if key.lower() in special_header_keys:
        special_header_values[key.lower()] = value.strip()

        Indeed, I do not thing any header value should be lowered.

        Show
        fcayre Florent Cayré added a comment - Following code : if key.lower() in special_header_keys: special_header_values [key.lower()] = value.lower().strip() should probably be patched as follows : if key.lower() in special_header_keys: special_header_values [key.lower()] = value.strip() Indeed, I do not thing any header value should be lowered.
        Hide
        kami Tomaz Muraus added a comment -

        Hey, do you have an example response which reproduces this problem / bug?

        Ideally you would run your script with LIBCLOUD_DEBUG environment variable set to /dev/stderr (LIBCLOUD_DEBUG=/dev/stderr python myscript.py) and pass the responses here (don't forget to strip out your credentials).

        Show
        kami Tomaz Muraus added a comment - Hey, do you have an example response which reproduces this problem / bug? Ideally you would run your script with LIBCLOUD_DEBUG environment variable set to /dev/stderr (LIBCLOUD_DEBUG=/dev/stderr python myscript.py) and pass the responses here (don't forget to strip out your credentials).

          People

          • Assignee:
            kami Tomaz Muraus
            Reporter:
            fcayre Florent Cayré
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 1h
              1h
              Remaining:
              Remaining Estimate - 1h
              1h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development