Enhance social image security and visual aesthetics#239
Merged
Conversation
Implement critical security patches and advanced visual refinements for the social image overlay feature. This includes robust authorization via media IDs, top-tier SSRF protection, and high-end visualization features. Backend: - Fix 403 Forbidden error for dive owners by implementing media_id based lookup, resolving mismatches between presigned URLs and stored paths. - Implement "Trusted Source" SSRF protection: outbound requests now use URLs retrieved from database records rather than raw user input. - Harden SSRF protection via URL canonicalization and by disabling HTTP redirects at the request sink. - Refactor profile visualization to use a transparent gradient fill clamped by a mask, allowing the background photo to remain visible. - Implement a vertical depth axis with overlaid labels (0m and Max Depth) integrated directly into the profile chart. - Optimize vertical positioning of the watermark URL and profile chart to prevent visual overlap and ensure a balanced composition. - Improve metadata rendering with drop shadows and icon-based metrics. Frontend: - Update SocialShareModal and socialHelpers to pass media_id to the API. - Fix ESLint import order errors for a clean build. Testing: - Expand automated test suite to 9 comprehensive cases covering all security, authorization, and data parsing scenarios. - Verify robust handling of numeric and complex string-based dive profile data.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Implement critical security patches and advanced visual refinements for the social image overlay feature. This includes robust authorization via media IDs, top-tier SSRF protection, and high-end visualization features.
Backend:
Frontend:
Testing: