Repository navigation
Conversation
Collaborator
|
We may consider the following as SVG seem to have a security problem with scripts potentially and render in a generic (non-size) image tag usually worse than a raster image: stac-browser
ol-stac
Docs
See also moregeo-it/stac-js#26 (comment) |
Author
|
Done up to 18de977. SVG now loads as a data: URL, Download is kept for SVG, AuthImage hides failed images and cards fall back to the next thumbnail, and docs/options.md has a note on origin and CSP. The ol-stac loader will follow as a separate PR there. |
This branch has not been deployed
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.
Proposed Changes
Shows SVG (
image/svg+xml) icons, thumbnails and previews. The detection lives in stac-js, see moregeo-it/stac-js#26. Draft until that is released, then this PR bumpsstac-js.Hardening from review:
authMedia.jsserves SVG as adata:URL instead of a blob URL (opaque origin)HrefActions.vuekeeps "Download" instead of "Open" forimage/svg+xmlAuthImagehides images that fail to load, cards fall back to the next thumbnaildocs/options.mdrecommends serving SVG data from a different origin and a CSP withoutunsafe-inlineA shared SVG loader for previews on the map follows in ol-stac.
Checklist
npm run lint)npm test) (e2e, integration tests unchanged)