Socket
Socket
Sign inDemoInstall

aws4

Package Overview
Dependencies
3
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.1 to 1.3.1

11

aws4.js

@@ -46,4 +46,9 @@ var aws4 = exports,

if (!headers.Host && !headers.host)
if (!headers.Host && !headers.host) {
headers.Host = request.hostname || request.host || this.createHost()
// If a port is specified explicitly, use it as is
if (request.port)
headers.Host += ':' + request.port
}
if (!request.hostname && !request.host)

@@ -214,4 +219,3 @@ request.hostname = headers.Host || headers.host

if (normalizePath) pathStr = pathStr.replace(/\/{2,}/g, '/')
if (pathStr[0] === '/') pathStr = pathStr.slice(1)
pathStr = '/' + pathStr.split('/').reduce(function(path, piece) {
pathStr = pathStr.split('/').reduce(function(path, piece) {
if (normalizePath && piece === '..') {

@@ -225,2 +229,3 @@ path.pop()

}, []).join('/')
if (pathStr[0] !== '/') pathStr = '/' + pathStr
if (decodeSlashesInPath) pathStr = pathStr.replace(/%2F/g, '/')

@@ -227,0 +232,0 @@ }

{
"name": "aws4",
"version": "1.2.1",
"version": "1.3.1",
"description": "Signs and prepares requests using AWS Signature Version 4",

@@ -65,7 +65,7 @@ "author": "Michael Hart <michael.hart.au@gmail.com> (http://github.com/mhart)",

"dependencies": {
"lru-cache": "^2.6.5"
"lru-cache": "^4.0.0"
},
"devDependencies": {
"mocha": "^2.2.5",
"should": "^7.0.1"
"mocha": "^2.4.5",
"should": "^8.2.2"
},

@@ -72,0 +72,0 @@ "scripts": {

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc