sleepy-serv 0.3.0 → 0.3.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/package.json +1 -1
- package/src/index.js +11 -10
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -45,17 +45,18 @@ function methodNotAllowedHandler (_req) {
|
|
|
45
45
|
throw new MethodNotAllowedError()
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
/* TODO: add whitelist support */
|
|
48
49
|
function validateDirectoryIllegalFiles (targetPath, filenames) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
Directory contains illegal files:
|
|
56
|
-
${targetPath}
|
|
57
|
-
|
|
58
|
-
|
|
50
|
+
// const hasInvalidFiles = filenames.some(filename =>
|
|
51
|
+
// !ALLOWED_FILES_ALL.includes(filename)
|
|
52
|
+
// )
|
|
53
|
+
|
|
54
|
+
// if (hasInvalidFiles) {
|
|
55
|
+
// throw new TypeError(`
|
|
56
|
+
// Directory contains illegal files:
|
|
57
|
+
// ${targetPath}
|
|
58
|
+
// `.trim())
|
|
59
|
+
// }
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
function validateLeafDirectory (targetPath, filenames, entries) {
|