Skip to content

Commit 3287b6f

Browse files
committed
api: block more of the local file paths
1 parent 6a0a789 commit 3287b6f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/api/views.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ function processInitialErrors(uri, next) {
107107
return true;
108108
}
109109

110-
if (/^(https?:\/\/)?\./i.test(uri)) {
110+
if (/^(https?:\/\/)?(\.|\/|~)/i.test(uri)) {
111111
next(new utils.HttpError(400, "file paths are not accepted"));
112112
return true;
113113
}

0 commit comments

Comments
 (0)