Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tinyhttp/cookie

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tinyhttp/cookie - npm Package Compare versions

Comparing version 0.5.1 to 0.5.2

6

CHANGELOG.md
# @tinyhttp/cookie
## 0.5.2
### Patch Changes
- Strip some bytes
## 0.5.1

@@ -4,0 +10,0 @@

2

package.json
{
"name": "@tinyhttp/cookie",
"version": "0.5.1",
"version": "0.5.2",
"type": "module",

@@ -5,0 +5,0 @@ "description": "HTTP cookie parser and serializer for Node.js",

@@ -44,5 +44,3 @@ const pairSplitRegExp = /; */

// skip things that don't look like key=value
if (eqIdx < 0) {
continue
}
if (eqIdx < 0) continue

@@ -76,11 +74,7 @@ const key = pair.substr(0, eqIdx).trim()

if (!fieldContentRegExp.test(name)) {
throw new TypeError('argument name is invalid')
}
if (!fieldContentRegExp.test(name)) throw new TypeError('argument name is invalid')
const value = opt.encode(val)
if (value && !fieldContentRegExp.test(value)) {
throw new TypeError('argument val is invalid')
}
if (value && !fieldContentRegExp.test(value)) throw new TypeError('argument val is invalid')

@@ -92,5 +86,3 @@ let str = name + '=' + value

if (isNaN(maxAge) || !isFinite(maxAge)) {
throw new TypeError('option maxAge is invalid')
}
if (isNaN(maxAge) || !isFinite(maxAge)) throw new TypeError('option maxAge is invalid')

@@ -101,5 +93,3 @@ str += '; Max-Age=' + Math.floor(maxAge)

if (opt.domain) {
if (!fieldContentRegExp.test(opt.domain)) {
throw new TypeError('option domain is invalid')
}
if (!fieldContentRegExp.test(opt.domain)) throw new TypeError('option domain is invalid')

@@ -125,9 +115,5 @@ str += '; Domain=' + opt.domain

if (opt.httpOnly) {
str += '; HttpOnly'
}
if (opt.httpOnly) str += '; HttpOnly'
if (opt.secure) {
str += '; Secure'
}
if (opt.secure) str += '; Secure'

@@ -134,0 +120,0 @@ if (opt.sameSite) {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc