feat(pydantic-ai): Support ImageUrl content type in span instrumentation #424
Annotations
2 warnings
|
Regex fails to match valid MIME types, leaking base64 data instead of redacting it:
sentry_sdk/integrations/pydantic_ai/consts.py#L7
The DATA_URL_BASE64_REGEX pattern `([a-zA-Z]+/[a-zA-Z]+)` only matches MIME types containing letters, but RFC 2046 allows digits, hyphens, periods, and plus signs. Valid data URLs like `data:image/svg+xml;base64,...` or `data:video/3gpp;base64,...` will not match, causing `_serialize_image_url_item` to fall through and return the full data URL including base64-encoded content that should be redacted.
|
|
[53N-D7M] Regex fails to match valid MIME types, leaking base64 data instead of redacting it (additional location):
sentry_sdk/integrations/pydantic_ai/spans/utils.py#L29
The DATA_URL_BASE64_REGEX pattern `([a-zA-Z]+/[a-zA-Z]+)` only matches MIME types containing letters, but RFC 2046 allows digits, hyphens, periods, and plus signs. Valid data URLs like `data:image/svg+xml;base64,...` or `data:video/3gpp;base64,...` will not match, causing `_serialize_image_url_item` to fall through and return the full data URL including base64-encoded content that should be redacted.
|