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

http-message-signatures

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

http-message-signatures - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

10

lib/httpbis/index.js

@@ -65,3 +65,5 @@ "use strict";

const { pathname } = typeof context.url === 'string' ? new URL(context.url) : context.url;
return [decodeURI(pathname)];
// https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-message-signatures#section-2.2.6
// empty path means use `/`
return [pathname || '/'];
}

@@ -75,3 +77,3 @@ case '@query': {

// absent query params means use `?`
return [decodeURI(search) || '?'];
return [search || '?'];
}

@@ -86,7 +88,7 @@ case '@query-param': {

}
const name = params.get('name').toString();
const name = decodeURIComponent(params.get('name').toString());
if (!searchParams.has(name)) {
throw new Error(`Expected query parameter "${name}" not found`);
}
return searchParams.getAll(name);
return searchParams.getAll(name).map((value) => encodeURIComponent(value));
}

@@ -93,0 +95,0 @@ case '@status': {

2

package.json
{
"name": "http-message-signatures",
"version": "1.0.2",
"version": "1.0.3",
"description": "HTTP message signature implementation",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

Sorry, the diff of this file is not supported yet

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