Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
openrosa-form-submission-middleware
Advanced tools
Express middleware for receiving OpenRosa xform submissions
This is based on connect-multiparty by Andrew Kelley.
It is express middleware for multiparty to process OpenRosa form submissions from ODK Collect following the OpenRosa FormSubmissionAPI spec.
The xml form submission is returned as req.body and any attached files are returned as req.files.
Incoming files are stored on disk in the tmp
folder and must be cleanup up afterwards with something like:
req.files.forEach(function(file) {
fs.unlink(file.path, function() {});
});
var openrosa = require('openrosa-form-submission-middleware');
var openrosaMiddleware = openrosa();
app.use('/submission', openrosaMiddleware);
app.post('/submission', function(req, res) {
console.log(req.body, req.files);
// don't forget to delete all req.files when done
});
Returns express middleware for receiving and processing OpenRosa form submissions.
options.maxContentLength
sets the maximum content length of form submissions (defaults to 10Mb)
options.secure
will redirect OpenRosa clients like ODK Collect to use https to send a submission (it does this by responding to the initial HEAD request from the client with a 204 with the Location headers set with the https protocol set)
Other options are passed directly on to multiparty.
[1.1.0]
FAQs
Express middleware for receiving OpenRosa xform submissions
The npm package openrosa-form-submission-middleware receives a total of 12 weekly downloads. As such, openrosa-form-submission-middleware popularity was classified as not popular.
We found that openrosa-form-submission-middleware demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.