Socket
Socket
Sign inDemoInstall

dd-trace

Package Overview
Dependencies
Maintainers
3
Versions
574
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dd-trace - npm Package Compare versions

Comparing version 0.5.3 to 0.5.4

2

lib/version.js

@@ -1,1 +0,1 @@

module.exports = '0.5.3'
module.exports = '0.5.4'
{
"name": "dd-trace",
"version": "0.5.3",
"version": "0.5.4",
"description": "Datadog APM tracing client for JavaScript",

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

@@ -115,6 +115,9 @@ 'use strict'

if (headers['x-amz-signature'] ||
(headers['authorization'] && headers['authorization'].startsWith('AWS4-HMAC-SHA256'))) {
if (headers['x-amz-signature']) {
return true
}
if ([].concat(headers['authorization']).some(startsWith('AWS4-HMAC-SHA256'))) {
return true
}
}

@@ -125,2 +128,6 @@

function startsWith (searchString) {
return value => String(value).startsWith(searchString)
}
function unpatch (http) {

@@ -127,0 +134,0 @@ this.unwrap(http, 'request')

@@ -208,2 +208,32 @@ 'use strict'

it('should skip injecting if one of the Authorization headers contains an AWS signature', done => {
const app = express()
app.get('/', (req, res) => {
try {
expect(req.get('x-datadog-trace-id')).to.be.undefined
expect(req.get('x-datadog-parent-id')).to.be.undefined
res.status(200).send()
done()
} catch (e) {
done(e)
}
})
getPort().then(port => {
appListener = app.listen(port, 'localhost', () => {
const req = http.request({
port,
headers: {
Authorization: ['AWS4-HMAC-SHA256 ...']
}
})
req.end()
})
})
})
it('should skip injecting if the X-Amz-Signature header is set', done => {

@@ -210,0 +240,0 @@ const app = express()

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