Skip to content

Commit

Permalink
warehouse: fix fingerprint assignments (pypi#16284)
Browse files Browse the repository at this point in the history
Signed-off-by: William Woodruff <william@trailofbits.com>
  • Loading branch information
woodruffw committed Jul 16, 2024
1 parent c5e7d0a commit 48594f2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion warehouse/forklift/legacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ def _process_attestations(request, artifact_path: Path):
)
except Exception as e:
with sentry_sdk.push_scope() as scope:
scope.fingerprint = e
scope.fingerprint = [e]
sentry_sdk.capture_message(
f"Unexpected error while verifying attestation: {e}"
)
Expand Down
2 changes: 1 addition & 1 deletion warehouse/oidc/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def verify_jwt_signature(self, unverified_token: str) -> SignedClaims | None:
)
if not isinstance(e, jwt.PyJWTError):
with sentry_sdk.push_scope() as scope:
scope.fingerprint = e
scope.fingerprint = [e]
# We expect pyjwt to only raise subclasses of PyJWTError, but
# we can't enforce this. Other exceptions indicate an abstraction
# leak, so we log them for upstream reporting.
Expand Down
2 changes: 1 addition & 1 deletion warehouse/oidc/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def mint_token_from_oidc(request: Request):
# an abstraction leak in jwt that we'll log for upstream reporting.
if not isinstance(e, (jwt.PyJWTError, KeyError)):
with sentry_sdk.push_scope() as scope:
scope.fingerprint = e
scope.fingerprint = [e]
sentry_sdk.capture_message(f"jwt.decode raised generic error: {e}")

return _invalid(
Expand Down

0 comments on commit 48594f2

Please sign in to comment.