Skip to content

Reject unsafe widget names before path construction - #2

Merged
GG-O-BP merged 1 commit into
mainfrom
fix/widget-name-path-traversal
Sep 3, 2026
Merged

Reject unsafe widget names before path construction#2
GG-O-BP merged 1 commit into
mainfrom
fix/widget-name-path-traversal

Conversation

@GG-O-BP

@GG-O-BP GG-O-BP commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • mendraw#2 reported path traversal through unvalidated widget names. The downloader moved to mxpak, but the successor still interpolated config names into build/widgets/ and .mpk paths.
  • widget.validate_name now rejects empty names, ./.., path separators (/, \\), and NUL while keeping dotted TOML names legal.
  • config.read validates every configured name at the boundary and the downloader re-validates before constructing cache/project paths.

Fixes glendix-labs/mendraw#2

Verification

  • gleam test — 103 passed.
  • ./scripts/verify.sh inner mxpak — passed.
  • pre-push verify.sh final — passed (family checks, widget build, Lustre E2E, Mendix full E2E). First push attempt hit a transient Hex API rate limit and passed unchanged on retry.

@GG-O-BP
GG-O-BP merged commit 0fe9cd5 into main Sep 3, 2026
@GG-O-BP
GG-O-BP deleted the fix/widget-name-path-traversal branch September 3, 2026 00:39
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.

[보안] 위젯 이름 검증 부재로 캐시 경로 탈출 (Path Traversal)

1 participant