-
-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to serve static files from filesystem #40
Conversation
Any update on this? Can it be reviewed and merged? |
@piranna, thanks for the PR. I will review it shortly. Serving files is always a potential vulnerability an should be reviewed respectively. |
Thanks for your answer :-) Yes, I know, I did this just only to be able to serve the HLS files from the same server :-) |
let data = undefined; | ||
|
||
try { | ||
data = readFileSync(`${process.cwd()}${path}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Serving files is very responsible. This line is a potential vulnerability that allows reading arbitrary files in the file system.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of just clossing the PR, you can suggest a proper fix for this... I think resolve the absolute path and ensure falls under the current working dir would be enough.
The PR contains vulnerabilities |
Fix #38.