@react-router/express 7.4.0 → 7.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -1
- package/dist/index.js +6 -4
- package/dist/index.mjs +6 -4
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# `@react-router/express`
|
|
2
2
|
|
|
3
|
+
## 7.4.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Better validation of `x-forwarded-host` header to preent potential security issues. ([#13309](https://github.com/remix-run/react-router/pull/13309))
|
|
8
|
+
- Updated dependencies:
|
|
9
|
+
- `react-router@7.4.1`
|
|
10
|
+
- `@react-router/node@7.4.1`
|
|
11
|
+
|
|
3
12
|
## 7.4.0
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -93,7 +102,7 @@
|
|
|
93
102
|
|
|
94
103
|
### Major Changes
|
|
95
104
|
|
|
96
|
-
- Remove single
|
|
105
|
+
- Remove single fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522))
|
|
97
106
|
- update minimum node version to 18 ([#11690](https://github.com/remix-run/react-router/pull/11690))
|
|
98
107
|
- Add `exports` field to all packages ([#11675](https://github.com/remix-run/react-router/pull/11675))
|
|
99
108
|
- node package no longer re-exports from react-router ([#11702](https://github.com/remix-run/react-router/pull/11702))
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @react-router/express v7.4.
|
|
2
|
+
* @react-router/express v7.4.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -70,9 +70,11 @@ function createRemixHeaders(requestHeaders) {
|
|
|
70
70
|
return headers;
|
|
71
71
|
}
|
|
72
72
|
function createRemixRequest(req, res) {
|
|
73
|
-
let [,
|
|
74
|
-
let [,
|
|
75
|
-
let
|
|
73
|
+
let [, hostnamePortStr] = req.get("X-Forwarded-Host")?.split(":") ?? [];
|
|
74
|
+
let [, hostPortStr] = req.get("host")?.split(":") ?? [];
|
|
75
|
+
let hostnamePort = Number.parseInt(hostnamePortStr, 10);
|
|
76
|
+
let hostPort = Number.parseInt(hostPortStr, 10);
|
|
77
|
+
let port = Number.isSafeInteger(hostnamePort) ? hostnamePort : Number.isSafeInteger(hostPort) ? hostPort : "";
|
|
76
78
|
let resolvedHost = `${req.hostname}${port ? `:${port}` : ""}`;
|
|
77
79
|
let url = new URL(`${req.protocol}://${resolvedHost}${req.originalUrl}`);
|
|
78
80
|
let controller = new AbortController();
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @react-router/express v7.4.
|
|
2
|
+
* @react-router/express v7.4.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -48,9 +48,11 @@ function createRemixHeaders(requestHeaders) {
|
|
|
48
48
|
return headers;
|
|
49
49
|
}
|
|
50
50
|
function createRemixRequest(req, res) {
|
|
51
|
-
let [,
|
|
52
|
-
let [,
|
|
53
|
-
let
|
|
51
|
+
let [, hostnamePortStr] = req.get("X-Forwarded-Host")?.split(":") ?? [];
|
|
52
|
+
let [, hostPortStr] = req.get("host")?.split(":") ?? [];
|
|
53
|
+
let hostnamePort = Number.parseInt(hostnamePortStr, 10);
|
|
54
|
+
let hostPort = Number.parseInt(hostPortStr, 10);
|
|
55
|
+
let port = Number.isSafeInteger(hostnamePort) ? hostnamePort : Number.isSafeInteger(hostPort) ? hostPort : "";
|
|
54
56
|
let resolvedHost = `${req.hostname}${port ? `:${port}` : ""}`;
|
|
55
57
|
let url = new URL(`${req.protocol}://${resolvedHost}${req.originalUrl}`);
|
|
56
58
|
let controller = new AbortController();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-router/express",
|
|
3
|
-
"version": "7.4.
|
|
3
|
+
"version": "7.4.1",
|
|
4
4
|
"description": "Express server request handler for React Router",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/remix-run/react-router/issues"
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@react-router/node": "7.4.
|
|
48
|
+
"@react-router/node": "7.4.1"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/express": "^4.17.9",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"peerDependencies": {
|
|
62
62
|
"express": "^4.17.1 || ^5",
|
|
63
63
|
"typescript": "^5.1.0",
|
|
64
|
-
"react-router": "7.4.
|
|
64
|
+
"react-router": "7.4.1"
|
|
65
65
|
},
|
|
66
66
|
"peerDependenciesMeta": {
|
|
67
67
|
"typescript": {
|