Skip to content
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

Closed
wants to merge 10 commits into from

Conversation

piranna
Copy link

@piranna piranna commented Mar 18, 2021

Fix #38.

@piranna
Copy link
Author

piranna commented Apr 12, 2021

Any update on this? Can it be reviewed and merged?

@mrlika
Copy link
Member

mrlika commented Apr 12, 2021

@piranna, thanks for the PR. I will review it shortly. Serving files is always a potential vulnerability an should be reviewed respectively.

@piranna
Copy link
Author

piranna commented Apr 12, 2021

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}`);
Copy link
Member

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.

Copy link
Author

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.

@mrlika
Copy link
Member

mrlika commented Feb 15, 2024

The PR contains vulnerabilities

@mrlika mrlika closed this Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add option to serve public folder
2 participants