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.
redis-sessions
Advanced tools
There is a need to maintain a universal session across different application server platforms.
It should be simple and straightforward to query a session and set session variables.
Features:
Every session belongs to an app (e.g. webapp
, app_cust123
)
lastactivity
, ip
which were active within the last n seconds.Every session must have an unique id, which is usually the userid of the logged in user.
Basic stuff
Create a session by supplying an id and a timeout in seconds. Will return the session token:
e.g. d131dd02c5e6eec4d131c69821bcb6a88393dd02c5e6eec4d131dd02c5e6eec4
Kill a session by supplying the session token.
Query a session by supplying the session token.
The idle
time is the duration in seconds since when this session was used before this request.
Will return the complete object:
{
"id":"user123",
"r": 123, // The number of reads on this token
"w": 4, // The number of writes on this token
"idle": 21, // The idle time in seconds.
"d":
{
"unread_msgs": "12",
"last_action": "/read/news",
"birthday": "2013-08-13"
}
}
Set/Update/Delete parameters by supplying a token and some data.
The data
object contains a simple key/value list where values are always strings.
To remove keys set them to null
, keys that are not supplied will not be touched:
{
"token": "d131dd02c5e6eec4d131c69821bcb6a88393dd02c5e6eec4d131dd02c5e6eec4",
"d":
{
"unread_msgs": null,
"last_action": "/read/msg/2121"
}
}
After the above operation
the resulting object will look like this:
{ "id":"user123", "r": 124, "w": 5, "idle": 1, "data": { "last_action": "/read/msg/2121", "birthday": "2013-08-13" } }
FAQs
An advanced session store for Redis
The npm package redis-sessions receives a total of 859 weekly downloads. As such, redis-sessions popularity was classified as not popular.
We found that redis-sessions demonstrated a healthy version release cadence and project activity because the last version was released less than 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.