Object versioning fails when object or version container name contains non-ASCII characters

Bug #1229142 reported by Alistair Coles
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Fix Released
Medium
Alistair Coles

Bug Description

When object names containing non-ASCII characters (e.g. £oo or %C2%A3oo) are PUT multiple times into a container with an x-versions-location set, subsequent DELETE of the object results in a 500 response status.

When the versions container name contains non-ASCII characters the first delete of an object succeeds (regardless of object name characters) but fails to restore previous version of object, so second delete incorrectly returns 404 even when object versions remain in the versiosn container.

v1.9.1

description: updated
Changed in swift:
assignee: nobody → Alistair Coles (alistair-coles)
status: New → In Progress
description: updated
Changed in swift:
milestone: none → 1.10.0-rc1
Changed in swift:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to swift (master)

Reviewed: https://review.openstack.org/47592
Committed: http://github.com/openstack/swift/commit/fa308d60bded8b730dda451321bb7baf5ded2aa8
Submitter: Jenkins
Branch: master

commit fa308d60bded8b730dda451321bb7baf5ded2aa8
Author: anc <email address hidden>
Date: Fri Sep 20 15:08:12 2013 +0100

    Fix utf-8 handling in object versions.

    Fixes object versioning when object name and/or version
    container name contain multibyte utf-8 characters.

    When object names containing non-ASCII characters
    are PUT multiple times into a container with an
    x-versions-location set, subsequent DELETE of the
    object results in a 500 response status.

    When the versions container name contains
    non-ASCII characters the first delete of an object
    succeeds but fails to restore previous version of
    object, so second delete incorrectly returns 404.

    Fixes bug 1229142

    Change-Id: I425440f76b8328f8e119d390bfa4c7022181e89e

Changed in swift:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in swift:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in swift:
milestone: 1.10.0-rc1 → 1.10.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to swift (feature/ec)

Fix proposed to branch: feature/ec
Review: https://review.openstack.org/54029

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to swift (feature/ec)
Download full text (24.9 KiB)

Reviewed: https://review.openstack.org/54029
Committed: http://github.com/openstack/swift/commit/94d3671b0bbf87fdbff845643963f3f9a97c58b5
Submitter: Jenkins
Branch: feature/ec

commit abcecd26a7b5871f75f0fbddf0d08bbac95bb089
Author: Kun Huang <email address hidden>
Date: Wed Oct 23 21:19:01 2013 +0800

    utf8 encode tempurl key

    In tempurl middleware, hmac uses the value of account metadata to
    generate HMAC-SHA1 signature and hmac must accept a str-type string, not
    a unicode string. The meta dict returned from get_info stroges special
    chars as unicode however. So just encode it for tempurl using.

    Closes-Bug: #1242644
    Change-Id: I4be62eea014a573efc4748470de57dccf00e431d

commit cd2e7df0b69bbd269cd3c4170e0fee8186a07c95
Author: Pete Zaitcev <email address hidden>
Date: Tue Oct 22 17:18:04 2013 -0600

    Add an __str__ method to brokers

    A few uses of broker.db_file are in printouts where we do need
    them, so the administrator may know what's up. Seems like an easy
    way to get rid of those is to make brokers identify themselves
    with common __str__. Alternative back-end implementations may
    supply something other than a filename here, for example a cluster
    name and a volume name.

    Note that I'm not sure if correct coercion would occur when
    brokers are bounced through dictionaries, hence explicit str().

    Change-Id: I329788ebd1fbe39ffadcf9f9d5194a74a88dde58

commit 9807a358c6d1314d25e3a41da75be5851fa0ac27
Author: Donagh McCabe <email address hidden>
Date: Fri Aug 23 15:03:08 2013 +0100

    Add WWW-Authenticate to 401 responses

    Per http://www.ietf.org/rfc/rfc2616.txt, when a 401 error is returned, the
    Www-Authenticate response header MUST also be returned. The format is
    described in http://www.ietf.org/rfc/rfc2617.txt.

    Swift supports and/or implements a number of authentication schemes
    including tempauth, Keystone, tempurl, formpost and container sync. In
    this fix, we use a catch-all, "Swift". The realm is the account (where
    known) or "unknown" (bad path or where the 401 is returned from code
    that does not have the request). Examples:

         Www-Authenticate: Swift realm="AUTH_1234567889"
         Www-Authenticate: Swift realm="unknown"

    Fixes bug #1215491

    Change-Id: I03362789318dfa156d3733ef9348795062a9cfc4

commit ed5101b2002b877518466ae5f9a6d652581238f2
Author: Yuan Zhou <email address hidden>
Date: Sat Oct 19 11:40:35 2013 +0800

    Adding more unit tests for audit_location_generator

    Change-Id: I40410fbbb79cea8647074f703e4675364c69d930

commit 5202b0e58613738cc81ec63e7c6da14ce5429526
Author: Peter Portante <email address hidden>
Date: Thu Sep 12 19:51:18 2013 -0400

    DiskFile API, with reference implementation

    Refactor on-disk knowledge out of the object server by pushing the
    async update pickle creation to the new DiskFileManager class (name is
    not the best, so suggestions welcome), along with the REPLICATOR
    method logic. We also move the mount checking and thread pool storage
    to the new ondisk.Devices object, which then also becomes th...

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to swift (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/570436

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to swift (master)

Reviewed: https://review.openstack.org/570436
Committed: https://git.openstack.org/cgit/openstack/swift/commit/?id=fbb8d7ebb52038fe445e2ca7e5c0459e8ff5ac5e
Submitter: Zuul
Branch: master

commit fbb8d7ebb52038fe445e2ca7e5c0459e8ff5ac5e
Author: Tim Burke <email address hidden>
Date: Thu May 24 13:00:58 2018 -0700

    Clarify that archive location headers should be URL-encoded

    Fix up function tests to actually *do* that quoting, and fix
    _listing_pages_iter to respect that.

    Change-Id: I1554042510819ea878b4c70417721944115e17f4
    Related-Bug: 1229142
    Related-Change: I425440f76b8328f8e119d390bfa4c7022181e89e
    Related-Bug: 1755554
    Related-Change: Ibcd90cc633c68973929ee5249c6598c22b342e3e

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.