Skip to content

Commit

Permalink
Add safeguard for accessing 'login' key
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszwawrzyk committed Jul 9, 2024
1 parent 8ac0e84 commit e2e54ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion oci/private/authn.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ def _get_token(rctx, state, registry, repository):
return state["token"][url]

auth = None
if pattern["login"] == "<token>":
if pattern.get("login", None) == "<token>":
if not rctx.os.environ.get("OCI_ENABLE_OAUTH2_SUPPORT"):
fail(IDENTITY_TOKEN_WARNING)

Expand Down

0 comments on commit e2e54ea

Please sign in to comment.