Skip to content

[23.0 backport] distribution: checkSupportedMediaType: allow additional media-types#44568

Merged
thaJeztah merged 1 commit into
moby:23.0from
thaJeztah:23.0_backport_relax_checkSupportedMediaType
Dec 3, 2022
Merged

[23.0 backport] distribution: checkSupportedMediaType: allow additional media-types#44568
thaJeztah merged 1 commit into
moby:23.0from
thaJeztah:23.0_backport_relax_checkSupportedMediaType

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

This addresses a regression introduced in 407e3a4 (#44367), which turned out to be "too strict", as there's old images that use, for example;

docker pull python:3.5.1-alpine
3.5.1-alpine: Pulling from library/python
unsupported media type application/octet-stream

Before 407e3a4, such mediatypes were accepted;

docker pull python:3.5.1-alpine
3.5.1-alpine: Pulling from library/python
e110a4a17941: Pull complete
30dac23631f0: Pull complete
202fc3980a36: Pull complete
Digest: sha256:f88925c97b9709dd6da0cb2f811726da9d724464e9be17a964c70f067d2aa64a
Status: Downloaded newer image for python:3.5.1-alpine
docker.io/library/python:3.5.1-alpine

This patch copies the additional media-types, using the list of types that were added in a215e15 (#30262), which fixed a similar issue.

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

This addresses a regression introduced in 407e3a4,
which turned out to be "too strict", as there's old images that use, for example;

    docker pull python:3.5.1-alpine
    3.5.1-alpine: Pulling from library/python
    unsupported media type application/octet-stream

Before 407e3a4, such mediatypes were accepted;

    docker pull python:3.5.1-alpine
    3.5.1-alpine: Pulling from library/python
    e110a4a17941: Pull complete
    30dac23631f0: Pull complete
    202fc3980a36: Pull complete
    Digest: sha256:f88925c97b9709dd6da0cb2f811726da9d724464e9be17a964c70f067d2aa64a
    Status: Downloaded newer image for python:3.5.1-alpine
    docker.io/library/python:3.5.1-alpine

This patch copies the additional media-types, using the list of types that
were added in a215e15, which fixed a
similar issue.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit a6a5394)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah added area/distribution Image Distribution status/2-code-review kind/bugfix PR's that fix bugs labels Dec 2, 2022
@thaJeztah thaJeztah added this to the 23.0.0 milestone Dec 2, 2022
@thaJeztah thaJeztah requested review from tianon and vvoland December 2, 2022 00:35
@thaJeztah thaJeztah closed this Dec 2, 2022
@thaJeztah thaJeztah reopened this Dec 2, 2022
@thaJeztah
Copy link
Copy Markdown
Member Author

Let me get this one in 👍

@thaJeztah thaJeztah merged commit bdf9baa into moby:23.0 Dec 3, 2022
@thaJeztah thaJeztah deleted the 23.0_backport_relax_checkSupportedMediaType branch December 3, 2022 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/distribution Image Distribution kind/bugfix PR's that fix bugs status/2-code-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants