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.
CSRF for Thinkjs 3.0
$ npm install think-csrf --save
config file src/config/middleware.js
const csrf = require('think-csrf');
module.exports = [{
handle: csrf,
options: {
session_name: 'csrf_token',
form_name: '_csrf',
header_name: 'x-csrf-token'
}
}];
Usage
ctx.csrf
getter for CSRF token
Name | Description | Default |
---|---|---|
session_name | csrf token's session name | 'csrf_token' |
form_name | request csrf token's name in body and query | '_csrf' |
header_name | request csrf token's name in header | 'x-csrf-token' |
errno | error status | 403 |
errmsg | error message | 'invalid csrf token' |
FAQs
CSRF for ThinkJS 3.x
The npm package think-csrf receives a total of 22 weekly downloads. As such, think-csrf popularity was classified as not popular.
We found that think-csrf demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 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.
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.