You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here are some key observations to aid the review process:
⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 Security concerns
Sensitive information exposure: The error logging in loadAsBitmap includes the full URL ($url) in the Sentry log message. If avatar URLs contain authentication tokens, API keys, or other sensitive query parameters in the URL, these secrets will be transmitted to and stored in Sentry. This violates security best practices for handling URLs that may contain credentials or signed access tokens.
The loadAsBitmap function uses a default size of 256, but the fallback initials generation in AvatarType.WithInitials.Url and AvatarType.WithInitials.Initials uses the default size of 64 from generateInitialsAvatarDrawable. This results in inconsistent bitmap dimensions (256x256 for successful network loads vs 64x64 for initials fallback), potentially causing UI scaling issues or blurry avatars.
The loadAsBitmap function logs the full URL to Sentry on error ("Failed to load SVG avatar: $url"). If avatar URLs contain sensitive query parameters (e.g., authentication tokens, signed URLs with secrets), these will be exposed in Sentry logs. Consider logging only the domain or a sanitized version of the URL.
SentryLog.e(TAG, "Failed to load SVG avatar: $url", result.throwable)
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Usefull for : Infomaniak/android-kMail#2854