feat: support files for fs.allow#12863
Conversation
|
|
|
About #12863, it is an edge case but if we had: fs: {
allow: [
'/path/to/custom/allow'Before this would allow files inside the js: {
allow: {
dirs: [],
files: []In which case we can go ahead with it in 4.4 and we avoid the path as a folder or dir issue. Let's discuss this before merging it. |
|
Does some OS allow to have a folder and file with the same path? Otherwise it would be pretty bad that you added a secret file to a list of allow without any benefits because there is no folder to serve |
|
No, it is as you said, it will allow a file with that name if instead of a folder you have a file named as the path in allow. But seeing it written as in your last comment, I agree it doesn't make any sense for a user to do this. I'm ok merging this PR as is for 4.4 then if others think we are good here. |
|
I agree with going ahead with this too. If they allow |
Description
It's the first time I try to contribute to this project, help is welcome to make it go through. I tried to address issue raised by #5689. So to support file in
fs.allowinstead of only directories.I have unfortunately no idea where to write a test for this feature.
Additional context
Fixes #5689
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123).