Skip to content
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

Some repositories cannot handle duplicate '/' in request #17

Closed
monkey1016 opened this issue May 21, 2021 · 3 comments
Closed

Some repositories cannot handle duplicate '/' in request #17

monkey1016 opened this issue May 21, 2021 · 3 comments

Comments

@monkey1016
Copy link
Contributor

Some repositories cannot handle 'v2//' in the request URL. See output example:

claircli -d quay.io/kjanania/operator-catalog:latest
2021-05-20 22:43:38,809|INFO|*****************************1******************************
2021-05-20 22:43:38,809|INFO|Analyzing <Image: quay.io/kjanania/operator-catalog:latest>
2021-05-20 22:43:39,074|DEBUG|GET: https://quay.io/v2/auth with parameters: {'params': {'client_id': 'claircli',
            'scope': 'repository:kjanania/operator-catalog:pull',
            'service': 'quay.io'}}
2021-05-20 22:43:39,309|DEBUG|Response: <Response [200]>
2021-05-20 22:43:39,312|DEBUG|GET: https://quay.io/v2/kjanania/operator-catalog/manifests/latest with parameters: {'headers': {'Accept': 'application/vnd.docker.distribution.manifest.v2+json,application/vnd.docker.distribution.manifest.v1+json',
             'Authorization': 'Bearer '
                              'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImVmNWRjZjI4MzhhY2MxYTBmYzcwNTI4MzY4ZmFkOGM2ODA1YzRhY2MyZmY5ZWY2MmI2ZDUyOTE3NzZjNjVlZjEifQ.eyJhY2Nlc3MiOlt7InR5cGUiOiJyZXBvc2l0b3J5IiwibmFtZSI6ImtqYW5hbmlhL29wZXJhdG9yLWNhdGFsb2ciLCJhY3Rpb25zIjpbInB1bGwiXX1dLCJjb250ZXh0Ijp7ImNvbS5hcG9zdGlsbGUucm9vdHMiOnsia2phbmFuaWEvb3BlcmF0b3ItY2F0YWxvZyI6IiRkaXNhYmxlZCJ9LCJjb20uYXBvc3RpbGxlLnJvb3QiOiIkZGlzYWJsZWQifSwiYXVkIjoicXVheS5pbyIsImV4cCI6MTYyMTU2ODYxOSwiaXNzIjoicXVheSIsImlhdCI6MTYyMTU2NTAxOSwibmJmIjoxNjIxNTY1MDE5LCJzdWIiOiIoYW5vbnltb3VzKSJ9.jYypICO0Mvw_PGiUtnJestHznQI9820pmYH-gDPpgaTVUf2ByGNXB0RhmkGxzN8N7f0TmI05NojiXnvfFCR5edfxxramn6EPJJNDfBhiw1SyWSMZxBNB0kplY38wfW6VEy-P9CgOHrh7pGjsFLnYutQZR1Um_eSYzqvX0KcudOnjhl82oNFWkVnFgKG9OMost8iUpXXgPKEhspIJoPKhysWUWy1zIPFh6y2Y10pyoaVkJzOHqYQXWy0BDSBN-EnIx6y-f5mo0z5_eQrrH6XGYwMZF6vVjh2JlrWyjMowQV-1U2RFdpSYQ1lmE7zvLhVIflBMriU9n2mASujD9LrLLw'}}
2021-05-20 22:43:39,552|DEBUG|Response: <Response [200]>
2021-05-20 22:43:39,566|INFO|Push layer [1/6]: sha256:7ef2e27b02ad9ebf31cf2ea6e4fa881f04de8eba178d6d6d2b7c4baf576fa46b
2021-05-20 22:43:39,567|DEBUG|POST: http://localhost:6060/v1/layers with parameters: {'json': {'Layer': {'Format': 'Docker',
                    'Headers': {'Authorization': 'Bearer '
                                                 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImVmNWRjZjI4MzhhY2MxYTBmYzcwNTI4MzY4ZmFkOGM2ODA1YzRhY2MyZmY5ZWY2MmI2ZDUyOTE3NzZjNjVlZjEifQ.eyJhY2Nlc3MiOlt7InR5cGUiOiJyZXBvc2l0b3J5IiwibmFtZSI6ImtqYW5hbmlhL29wZXJhdG9yLWNhdGFsb2ciLCJhY3Rpb25zIjpbInB1bGwiXX1dLCJjb250ZXh0Ijp7ImNvbS5hcG9zdGlsbGUucm9vdHMiOnsia2phbmFuaWEvb3BlcmF0b3ItY2F0YWxvZyI6IiRkaXNhYmxlZCJ9LCJjb20uYXBvc3RpbGxlLnJvb3QiOiIkZGlzYWJsZWQifSwiYXVkIjoicXVheS5pbyIsImV4cCI6MTYyMTU2ODYxOSwiaXNzIjoicXVheSIsImlhdCI6MTYyMTU2NTAxOSwibmJmIjoxNjIxNTY1MDE5LCJzdWIiOiIoYW5vbnltb3VzKSJ9.jYypICO0Mvw_PGiUtnJestHznQI9820pmYH-gDPpgaTVUf2ByGNXB0RhmkGxzN8N7f0TmI05NojiXnvfFCR5edfxxramn6EPJJNDfBhiw1SyWSMZxBNB0kplY38wfW6VEy-P9CgOHrh7pGjsFLnYutQZR1Um_eSYzqvX0KcudOnjhl82oNFWkVnFgKG9OMost8iUpXXgPKEhspIJoPKhysWUWy1zIPFh6y2Y10pyoaVkJzOHqYQXWy0BDSBN-EnIx6y-f5mo0z5_eQrrH6XGYwMZF6vVjh2JlrWyjMowQV-1U2RFdpSYQ1lmE7zvLhVIflBMriU9n2mASujD9LrLLw'},
                    'Name': 'sha256:7ef2e27b02ad9ebf31cf2ea6e4fa881f04de8eba178d6d6d2b7c4baf576fa46b',
                    'ParentName': '',
                    'Path': 'https://quay.io/v2//kjanania/operator-catalog/blobs/sha256:7ef2e27b02ad9ebf31cf2ea6e4fa881f04de8eba178d6d6d2b7c4baf576fa46b'}}}
2021-05-20 22:43:39,763|DEBUG|Response: <Response [400]>
2021-05-20 22:43:39,764|WARNING|Could not analyze quay.io/kjanania/operator-catalog:latest: Got response 400 from clair with message: {"Error":{"Message":"could not find layer"}}

2021-05-20 22:43:39,765|INFO|============================================================
2021-05-20 22:43:39,765|INFO|            CLAIR ANALYSIS REPORTS: (1) IN TOTAL            
2021-05-20 22:43:39,766|INFO|============================================================
2021-05-20 22:43:39,766|ERROR|IMAGES COULD NOT BE ANALYZED (1)
2021-05-20 22:43:39,767|ERROR|quay.io/kjanania/operator-catalog:latest
@joelee2012
Copy link
Owner

joelee2012 commented May 24, 2021

thanks for reporting issue.
i can't access the url

$ curl -IkL https://quay.io/v2//kjanania/operator-catalog/blobs/sha256:7ef2e27b02ad9ebf31cf2ea6e4fa881f04de8eba178d6d6d2b7c4baf576fa46b
HTTP/1.1 404 NOT FOUND
Server: nginx/1.12.1
Date: Mon, 24 May 2021 04:59:43 GMT
Content-Type: text/html
Content-Length: 232
Connection: close

is the url (https://quay.io/v2//kjanania/operator-catalog/blobs/sha256:7ef2e27b02ad9ebf31cf2ea6e4fa881f04de8eba178d6d6d2b7c4baf576fa46b) working for you ?

@monkey1016
Copy link
Contributor Author

Sorry, I accidentally deleted that image. But I have a pull request that should resolve this issue. I'll push that image again.

@monkey1016
Copy link
Contributor Author

Actually, I take that back. I didn't delete the image. The 404 is a symptom of the issue. If you remove the extra '/' and use this URL instead, the download works:
https://quay.io/v2/kjanania/operator-catalog/blobs/sha256:7ef2e27b02ad9ebf31cf2ea6e4fa881f04de8eba178d6d6d2b7c4baf576fa46b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants