mirror of
https://github.com/moby/buildkit.git
synced 2026-08-07 08:10:44 +00:00
authprovider: synchronize all authConfigCache access
Signed-off-by: Dan Duvall <dduvall@wikimedia.org>
This commit is contained in:
@@ -182,9 +182,9 @@ func (ap *authProvider) VerifyTokenAuthority(ctx context.Context, req *auth.Veri
|
||||
}
|
||||
|
||||
func (ap *authProvider) getAuthConfig(host string) (*types.AuthConfig, error) {
|
||||
ap.mu.Lock()
|
||||
defer ap.mu.Unlock()
|
||||
if _, exists := ap.authConfigCache[host]; !exists {
|
||||
ap.mu.Lock()
|
||||
defer ap.mu.Unlock()
|
||||
if host == "registry-1.docker.io" {
|
||||
host = "https://index.docker.io/v1/"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user