-
-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes docker auth passwords that contain a colon (#839)
- Loading branch information
1 parent
3a1ab3a
commit 50df1d4
Showing
2 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,5 +64,23 @@ describe("Auths", () => { | |
}; | ||
expect(await locator.getAuthConfig("https://registry.example.com", containerRuntimeConfig)).toEqual(authConfig); | ||
}); | ||
|
||
it("should return credentials from encoded auth when the password contains a colon", async () => { | ||
const containerRuntimeConfig: ContainerRuntimeConfig = { | ||
auths: { | ||
"https://registry.example.com": { | ||
email: "[email protected]", | ||
auth: "dXNlcjpwYXNzOjE=", | ||
}, | ||
}, | ||
}; | ||
const authConfig: AuthConfig = { | ||
username: "user", | ||
password: "pass:1", | ||
email: "[email protected]", | ||
registryAddress: "https://registry.example.com", | ||
}; | ||
expect(await locator.getAuthConfig("https://registry.example.com", containerRuntimeConfig)).toEqual(authConfig); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters