Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
cookie-sessions-ideame
Advanced tools
Secure cookie-based session middleware for Connect. This is a new module and I wouldn't recommend for production use just yet.
Session data is stored on the request object in the 'session' property:
var connect = require('connect'),
sessions = require('cookie-sessions');
Connect.createServer(
sessions({secret: '123abc'}),
function(req, res, next){
req.session = {'hello':'world'};
res.writeHead(200, {'Content-Type':'text/plain'});
res.end('session data updated');
}
).listen(8080);
The session data is JSON.stringified, encrypted and timestamped, then a HMAC signature is attached to test for tampering. The main function accepts a number of options:
* secret -- The secret to encrypt the session data with
* timeout -- The amount of time in miliseconds before the cookie expires
(default: 24 hours)
* session_key -- The cookie key name to store the session data in
(default: _node)
* path -- The path to use for the cookie (default: '/')
In summary: don't use cookie storage if you keep a lot of data in your sessions!
FAQs
Secure cookie-based session middleware for Connect
The npm package cookie-sessions-ideame receives a total of 0 weekly downloads. As such, cookie-sessions-ideame popularity was classified as not popular.
We found that cookie-sessions-ideame demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.