Skip to content

fix(security): use p.isWithin for archive extraction bounds - #404

Merged
ZhuchkaTriplesix merged 1 commit into
devfrom
issue/401-archive-is-within
Jul 27, 2026
Merged

fix(security): use p.isWithin for archive extraction bounds#404
ZhuchkaTriplesix merged 1 commit into
devfrom
issue/401-archive-is-within

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Summary

  • Add shared archive_path_guard.dart with isArchiveExtractPathWithinRoot and isArchiveEntryNameSafe
  • Replace startsWith(root) checks in marketplace, sideload, and updater extract paths
  • Regression test for sibling-prefix false positive (/tmp/abc vs /tmp/abcd)

Closes #401

Test plan

  • flutter test test/core/security/archive_path_guard_test.dart
  • flutter test test/core/extensions/local_extension_installer_test.dart
  • flutter test test/core/updater/update_platform_installer_test.dart

Closes #401 — shared archive_path_guard replaces startsWith checks in
marketplace, sideload, and updater extract paths.
@github-actions github-actions Bot added enhancement New feature or request core Core library logic and services labels Jul 27, 2026
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit 135404d into dev Jul 27, 2026
4 checks passed
@ZhuchkaTriplesix ZhuchkaTriplesix self-assigned this Jul 27, 2026
@ZhuchkaTriplesix
ZhuchkaTriplesix deleted the issue/401-archive-is-within branch July 27, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core library logic and services enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant