Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
simple-cookie
Advanced tools
#RESERVED
#simple-cookie simple cookie serializer & parser for node.js
##install npm install simple-cookie
#usage
var cookie = require('simple-cookie');
var cookieObject = {
name: 'cookieName',
value: 'cookie value',
expires: (new Date()).valueOf() + 500000,
path: '/',
domain: 'domain.com',
httponly: false,
secure: true
}
What is cookieObject
:
name String
: cookie name
value String
: cookie value
expires DateString | Number | Date
(optional) : expire date
path DateString | Number | Date
(optional) : cookie path, defaults to /
domain String
(optional) : cookie domain
httponly Boolean
(optional) : defaults to false
secure Boolean
(optional) : defaults to false
##methods
var cookieString = cookie.stringify( cookieObject );
# cookieName=cookie%20value; Expires: Sat, 15-Aug-2015 17:41:05 GMT; Max-Age: 31449600; Path=/; domain=domain.com; secure
cookie.parse( cookieString [, defaultPath] [, defaultDomain] );
# will create object like the 'cookieObject'
cookie.tokenize([
{name:'cookie1','cvalue1'},
{name:'cookie2','cvalue2'},
{name:'cookie3','cvalue3'}
]);
# cookie1=cvalue1; cookie2=cvalue2; cookie3=cvalue3
chhers,
FAQs
Simple cookie parser & serializer
The npm package simple-cookie receives a total of 1,548 weekly downloads. As such, simple-cookie popularity was classified as popular.
We found that simple-cookie 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.
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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.