Skip to content

Commit

Permalink
Handle case of short manually set single-user API keys
Browse files Browse the repository at this point in the history
Co-authored-by: Padraic Shafer <76011594+padraic-shafer@users.noreply.github.com>
  • Loading branch information
danielballan and padraic-shafer committed May 17, 2024
1 parent 01a4db4 commit 13e38f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tiled/client/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def __repr__(self):
",".join(f"'{identity['id']}'" for identity in identities)
)
if self.api_key is not None:
auth_info.append(f"with API key '{self.api_key[:8]}...'")
auth_info.append(f"with API key '{self.api_key[:min(len(self.api_key)//2, 8)]}...'")
auth_repr = " ".join(auth_info)
return f"<{type(self).__name__} {auth_repr}>"

Expand Down

0 comments on commit 13e38f0

Please sign in to comment.