[Snyk] Security upgrade react-router-dom from 5.1.2 to 6.30.2#100
[Snyk] Security upgrade react-router-dom from 5.1.2 to 6.30.2#100thebeanogamer wants to merge 1 commit intomasterfrom
Conversation
The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-JS-REACTROUTER-14908286
There was a problem hiding this comment.
Pull request overview
This PR upgrades the react-router-dom dependency from version 5.1.2 to 6.30.3 to address a high-severity Open Redirect vulnerability (SNYK-JS-REACTROUTER-14908286). This is a major version upgrade that introduces significant breaking changes to the routing API.
Changes:
- Updated
react-router-domfrom^5.1.2to^6.30.2in package.json - Updated pnpm-lock.yaml to reflect the new dependency tree with version 6.30.3
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| package.json | Updates react-router-dom version constraint to ^6.30.2 |
| pnpm-lock.yaml | Updates dependency resolution to react-router-dom 6.30.3 and adds new transitive dependencies including @remix-run/router |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "react-router-dom": "^6.30.2", | ||
| "react-simple-code-editor": "^0.11.0", | ||
| "react-vis-network": "^1.0.0", |
There was a problem hiding this comment.
The version in package.json specifies ^6.30.2 but the pnpm-lock.yaml has resolved to 6.30.3. While this is typically acceptable with semver ranges, for security-critical upgrades it's better to have exact alignment. Consider updating package.json to ^6.30.3 to match the locked version.
| "react-router-dom": "^6.30.2", | |
| "react-simple-code-editor": "^0.11.0", | |
| "react-vis-network": "^1.0.0", | |
| "react-router-dom": "^6.30.3", | |
| "react-simple-code-editor": "^0.11.0", | |
| "react-vis-network": "^1.0.0", |
| "react-moment": "^0.9.7", | ||
| "react-redux": "^7.2.0", | ||
| "react-router-dom": "^5.1.2", | ||
| "react-router-dom": "^6.30.2", |
There was a problem hiding this comment.
This PR upgrades react-router-dom from version 5.1.2 to 6.30.3, which is a major version upgrade with significant breaking changes. However, no corresponding code changes are included to handle these breaking changes. The codebase extensively uses React Router v5 APIs that have been removed or changed in v6:
- Switch component has been replaced with Routes and has a different API
- Route component props have changed (no more 'component' prop, children rendering is different)
- Redirect component has been replaced with Navigate component
- The 'exact' prop is no longer needed on Routes
This upgrade will break the application at runtime. The PR needs to include migration code for all affected files including:
- src/controllers/App.js
- src/controllers/Routes.js
- src/pages/Campaign.js
- src/pages/ChallengePage.js
- src/pages/Lists.js
- src/pages/TeamPage.js
- src/plugins/base/auth/components/EmailVerif.js
- src/plugins/base/auth/components/PasswordReset.js
- src/plugins/base/auth/components/Teams.js
- src/plugins/base/auth/components/Welcome.js
- src/plugins/cms.js
Before merging, all imports and usages of Switch, Route, and Redirect need to be updated to the v6 API.
| "react-router-dom": "^6.30.2", | |
| "react-router-dom": "^5.1.2", |
Snyk has created this PR to fix 1 vulnerabilities in the pnpm dependencies of this project.
Snyk changed the following file(s):
package.jsonpnpm-lock.yamlVulnerabilities that will be fixed with an upgrade:
SNYK-JS-REACTROUTER-14908286
Important
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.
For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic
Learn how to fix vulnerabilities with free interactive lessons:
🦉 Open Redirect