Skip to content

Restrict SVG file linker path resolution#84

Open
fhwvtqdc2q-svg wants to merge 1 commit into
exyte:mainfrom
fhwvtqdc2q-svg:restrict-svg-linker-paths
Open

Restrict SVG file linker path resolution#84
fhwvtqdc2q-svg wants to merge 1 commit into
exyte:mainfrom
fhwvtqdc2q-svg:restrict-svg-linker-paths

Conversation

@fhwvtqdc2q-svg
Copy link
Copy Markdown

Summary

  • trim and reject empty linked image sources
  • reject absolute-scheme image references in SVGURLLinker
  • keep local file image references contained within the configured base directory after normalization/symlink resolution

Why

SVGURLLinker previously appended untrusted SVG image href values directly to the base URL and loaded the result with Data(contentsOf:). For local SVG files, relative paths such as ../ could resolve outside the SVG directory and read unintended local files.

Testing

  • git diff --check
  • Local Swift/Xcode tests were not run because Swift/Xcode are not available in this Windows environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant