[visualizer] removed force https when loading replay files#191
[visualizer] removed force https when loading replay files#191PaulicStudios merged 1 commit intodevfrom
Conversation
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip You can disable poems in the walkthrough.Disable the |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@visualizer/src/ts/replay_loader/replayLoader.ts`:
- Around line 116-117: The fetch in replayLoader.ts uses a user-controlled
filePath from query params without validation; add a URL
validation/normalization step (using the URL constructor) before calling fetch
to ensure the replay source is a single allowed origin/protocol (e.g.,
same-origin or https only) and normalize relative paths to the app origin; if
validation fails, reject/throw and do not call fetch. Update the code path that
receives the param in main.ts to use the same validation helper so only a single
normalized, allowed URL reaches replayLoader.load (or the function that calls
fetch), and log a clear error when an invalid URL is provided.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 9aa5f0c7-8899-42fb-8d79-1d8771d15c35
📒 Files selected for processing (1)
visualizer/src/ts/replay_loader/replayLoader.ts
* [visualizer] removed force https when loading replay files (#191) * deleted dublicate go client lib, put go.mod into root, fix paths in dockerfile * [bots|go] refactor: renamed template to softcore * removed post create cmd as ./../../client_lib works both in the monorepo and in the devcontainer itself. removed cpp addons * reverted back changes that got lost from deleting the duplicate client_lib * [monorepo] added go language support to root makefile * [bots|go] fix basic connection so that client lib connects and ticks play out
So that a local s3 bucket storage for local website testing also works
Summary by CodeRabbit