@vercel/client 17.2.57 → 17.2.58
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/dist/utils/index.js +20 -13
- package/package.json +3 -3
package/dist/utils/index.js
CHANGED
|
@@ -178,24 +178,31 @@ async function buildFileTree(path, {
|
|
|
178
178
|
const relativeFromRoot = (0, import_path.relative)(projectRoot, bulkRedirectsFullPath);
|
|
179
179
|
if (relativeFromRoot.startsWith("..")) {
|
|
180
180
|
debug(
|
|
181
|
-
`Skipping bulk redirects
|
|
181
|
+
`Skipping bulk redirects path "${bulkRedirectsPath}" - path traversal detected (resolves outside project root)`
|
|
182
182
|
);
|
|
183
183
|
} else {
|
|
184
|
-
|
|
185
|
-
bulkRedirectsFullPath
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
184
|
+
try {
|
|
185
|
+
const stats = await (0, import_fs_extra.stat)(bulkRedirectsFullPath);
|
|
186
|
+
if (stats.isDirectory()) {
|
|
187
|
+
const dirFiles = await (0, import_readdir_recursive.default)(bulkRedirectsFullPath, []);
|
|
188
|
+
for (const file of dirFiles) {
|
|
189
|
+
refs.add(file);
|
|
190
|
+
}
|
|
191
|
+
debug(
|
|
192
|
+
`Including ${dirFiles.length} files from bulk redirects directory "${bulkRedirectsPath}" in deployment`
|
|
193
|
+
);
|
|
194
|
+
} else if (stats.isFile()) {
|
|
195
|
+
refs.add(bulkRedirectsFullPath);
|
|
196
|
+
debug(
|
|
197
|
+
`Including bulk redirects file "${bulkRedirectsPath}" in deployment`
|
|
198
|
+
);
|
|
199
|
+
}
|
|
200
|
+
} catch (_e) {
|
|
201
|
+
debug(`Bulk redirects path "${bulkRedirectsPath}" not found`);
|
|
195
202
|
}
|
|
196
203
|
}
|
|
197
204
|
} catch (e) {
|
|
198
|
-
debug(`Error checking for bulk redirects
|
|
205
|
+
debug(`Error checking for bulk redirects path: ${e}`);
|
|
199
206
|
}
|
|
200
207
|
}
|
|
201
208
|
if (refs.size > 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/client",
|
|
3
|
-
"version": "17.2.
|
|
3
|
+
"version": "17.2.58",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"typings": "dist/index.d.ts",
|
|
6
6
|
"homepage": "https://vercel.com",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"sleep-promise": "8.0.1",
|
|
44
44
|
"tar-fs": "1.16.3",
|
|
45
45
|
"@vercel/build-utils": "13.8.0",
|
|
46
|
-
"@vercel/
|
|
47
|
-
"@vercel/
|
|
46
|
+
"@vercel/routing-utils": "6.0.2",
|
|
47
|
+
"@vercel/error-utils": "2.0.3"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "node ../../utils/build.mjs",
|