Repository navigation
fix: secure dev-server file access and refresh tutorial tooling - #380
Merged
Merged
Conversation
Validate decoded request targets and canonical filesystem paths before serving checkout content, including symlink targets and tutorial metadata. Bind Express and BrowserSync to loopback by default, provide an explicit --host option for trusted-network previews, and add regression tests and documentation.
Update UI5 CLI, development middleware, transpilation tooling, local-web-server, and QUnit type declarations consistently across all 84 runnable tutorial steps. Keep OpenUI5 runtime/types at 1.148.10 and TypeScript at 6.0.3, and regenerate the npm workspace lockfile.
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.
Summary
Prevent filesystem traversal in the tutorial preview server, make network sharing an explicit opt-in, and refresh development tooling across the runnable tutorial workspaces without updating OpenUI5.
Why
The dev server previously joined the raw request URL to the repository directory and served any existing file. Clients that preserve
../segments could escape the checkout and read files accessible to the developer account. Express and BrowserSync also listened on network interfaces by default.Dev-server changes
127.0.0.1by default.--host <address>and--help, including IPv4/IPv6 support and a warning for network-visible bindings.steps.jsonreads.npm test.Trusted-network preview remains available explicitly:
Network mode is still unauthenticated and exposes checkout files and the BrowserSync UI. It is intended only for trusted development networks, not public hosting.
Tutorial dependency updates
Update declarations consistently across all 84 runnable tutorial steps and regenerate the npm lockfile:
@ui5/cli^4.0.53^4.0.73ui5-middleware-livereload^3.3.1^3.4.0ui5-middleware-serveframework^3.8.1^3.8.2ui5-middleware-simpleproxy^3.7.1^3.9.0ui5-tooling-transpile^3.11.0^3.14.1local-web-server^5.4.0^5.4.2@types/qunit2.5.42.19.14Unchanged: OpenUI5 runtime and
@openui5/typesremain at 1.148.10; TypeScript remains at 6.0.3; the interface generator remains at 0.12.0. The repository remains npm-only. Root dependency updates and pnpm lockfile removal are already onmainand are not duplicated here.Validation
Validated on Node.js 24.14.0:
npm ci --offline --ignore-scripts --no-audit --no-fund.npm test: 54 dev-server tests and 83 workspace typechecks passed.npm run lint:lockfileandgit diff --checkpassed.Build limitation: the full site build timed out locally during an
npxinvocation. Direct UI5 CLI builds passed; the existing PR workflow will run the complete site build in CI.Commits
fix: prevent dev-server filesystem traversalbuild: refresh tutorial tooling without changing OpenUI5