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

Unable to read /proc/* files #212

Open
mleblebici opened this issue Jul 3, 2022 · 1 comment
Open

Unable to read /proc/* files #212

mleblebici opened this issue Jul 3, 2022 · 1 comment

Comments

@mleblebici
Copy link

As discussed in this issue, send library is not able to return contents of files in /proc directory. It is mostly because of /proc is a pseudo file system.

@mleblebici
Copy link
Author

I created this pull request to overcome this problem. I tested it with following PoC application.

const express = require('express')
const app = express()

app.get('/get', (req,res) => {
	res.download(req.query.filename)
})

app.listen(12345, function(error) {
	console.log(error)
})

It worked for /proc/* files, it also did not break anything for other valid files. I tried non-existing files, they are returning 404 as expected. For getSize function, I mainly modified the read function of nodejs-procfs.

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

No branches or pull requests

1 participant