-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
manifest has messed up encoding #1065
Comments
Which manifest is this? (I was unable to find it on the hub) Is the encoding causing an issue for you? |
Yes, it is. It affects digest of manifest. |
The reason I ask is that my
Obviously I'm missing something, because our manifests are not the same :) |
Oh, I'm sorry. I should have provide proper reproducer. Here it is: set -ex
cat >Dockerfile <<EOF
FROM scratch
MAINTAINER ľščťť <mail@example.com> "asd qwe"
EOF
docker build --tag=e .
docker pull registry:2
docker run --net=host --name=reg -d registry:2
docker tag e localhost:5000/e
docker push localhost:5000/e
curl -s http://localhost:5000/v2/e/manifests/latest | egrep -o "MAINTAINER.+\]"
docker stop reg
docker rm reg
docker rmi e localhost:5000/e My current As you'll be able to see, the |
As per the JSON spec text is encoded as UTF-8 (which is why What problem is this causing you? |
Aha, didn't know that the brackets are escaped by purpose. So I guess this is fine then if it's your specification. (the issue I had was I thought that bracket escaping is a bug and I need to workaround that) Thanks for the pointer! |
Out of curiosity. What is the reason to escape angle brackets and ampersand? |
@TomasTomecek That is a Go stdlib protection to avoid html injection, I believe. It is described here. |
I have pushed
busybox
image to my locally running distribution. When Icurl
a manifest for this image, the encoding is scrambled:As you can see, some characters are encoded and some are still unicode.
Registry is running from docker hub:
Docker is from my distribution:
The text was updated successfully, but these errors were encountered: