smart_proxy_container_gateway 3.5.0 → 3.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 715c97cadccbfc6c3c06c9aeb85e2b17115d10f045ee042d73eb8c236e669b43
4
- data.tar.gz: d3b12b7ba4bb3c32afe6fe11926cc749b721f0cbcbe1f1b587ef6bfaf5222c03
3
+ metadata.gz: 6313f6d79e13c64566f5a38e8a0ec438a25d97c758a087b2f9d35e7e05474617
4
+ data.tar.gz: 62cfd803827187877f6f186fda48e298431fc1c04052e6990a3e9a91e2c9222a
5
5
  SHA512:
6
- metadata.gz: 6b3a173a1d5bacb8962effdd385b2513abea50c367f6b69f316a3e2b6a52d9f251319b6046c2cc7d3499a04abe9114229c537320b1bbb384a852d0cafc66966f
7
- data.tar.gz: 13c04e0b4e0cc47af5fc53e9321bba2e3ae55cf681194e50bc4a08b8a0495a495985be5081843aed823a383a82d0a29dc8f8cbf46ade1a01d2d4acbd248076b8
6
+ metadata.gz: 1e293529abd32590aaf6876f6db0155fc46c53fd04d1b736ebe9557acb2cc39f54b9e4a98251c7fb9177502ed7ab4dca941058e167a6f4abaea90d45d37cd09e
7
+ data.tar.gz: c20e07a5add224865098a8ef079ab384f965eb6c60ee24e663719b3f8e6544ed28f365dc74e3431fd9d65ef6725cbfab08e247c6b2013fab9a951b9e38b9c065
@@ -181,11 +181,11 @@ module Proxy
181
181
  get '/v2/token' do
182
182
  response.headers['Docker-Distribution-API-Version'] = 'registry/2.0'
183
183
 
184
- # Flatpak client requests do not contain the account param that podman relies on.
185
- # It contains Base64 encoded username in the Authorization header.
186
- # We need to extract the username from the Authorization header and
187
- # set it as the account param to be used when inserting new token record.
188
- if flatpak_client? && auth_header.raw_header.present?
184
+ # Some clients (e.g. Flatpak, Cincinnati) do not include the account
185
+ # query parameter in the token request. Extract the username from the
186
+ # Base64-encoded Basic Authorization header and use it as the account
187
+ # param when inserting a new token record.
188
+ if request.params['account'].nil? && auth_header.raw_header.present?
189
189
  encoded_string = auth_header.raw_header&.split(' ')&.[](1)
190
190
  decoded_string = Base64.decode64(encoded_string) if encoded_string.present?
191
191
  username = decoded_string.split(':')[0] if decoded_string.present?
@@ -1,5 +1,5 @@
1
1
  module Proxy
2
2
  module ContainerGateway
3
- VERSION = '3.5.0'.freeze
3
+ VERSION = '3.5.1'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smart_proxy_container_gateway
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.0
4
+ version: 3.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ian Ballou