
Security News
Next.js Patches Critical Middleware Vulnerability (CVE-2025-29927)
Next.js has patched a critical vulnerability (CVE-2025-29927) that allowed attackers to bypass middleware-based authorization checks in self-hosted apps.
cookie-monster
Advanced tools
NOTE: cookie-monster is a fork of cookie-cutter by substack (James Halliday), which seems to have gone stale.
Set and get cookies in the browser or in node with document
.
In your browser code with browserify:
var cookie = require('cookie-monster');
var times = parseInt(cookie.get('times'), 10) || 0;
cookie.set('times', times + 1);
and times
will increment every time the page is reloaded.
var cookie = require('cookie-monster');
Return a new cookie object with .get()
and .set()
operating on document
.
document.cookie
should be a non-referentially transparent setter/getter combo
like the DOM's variant where assignment with optional path and expiry creates a
new cookie in the getter as a key=value pair.
Return the cookie value for key
.
Set the cookie at key
to value
with optional parameters expires
and path
.
To unset a cookie, use a date in the past, ex: { expires: new Date(0) }
With npm do:
npm install cookie-monster
With the console do
$ npm test
MIT/X11
FAQs
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
Next.js has patched a critical vulnerability (CVE-2025-29927) that allowed attackers to bypass middleware-based authorization checks in self-hosted apps.
Security News
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
Product
Socket, the leader in open source security, is now available on Google Cloud Marketplace for simplified procurement and enhanced protection against supply chain attacks.