Socket
Socket
Sign inDemoInstall

body-fingerprint

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

body-fingerprint - npm Package Compare versions

Comparing version 1.3.7 to 1.4.0

lib/entropy.js

9

index.js
"use strict";
const clarinet = require("./lib/clarinet");
const { getEntropy } = require("./lib/entropy");

@@ -14,2 +15,3 @@ const multipartFingerprint = (req, _, next) => {

},
entropy: null,
};

@@ -59,2 +61,3 @@

.join(";");
req.multipart.entropy = getEntropy(req.multipart.raw.body);
});

@@ -84,4 +87,2 @@

const _handle = new Int32Array(new SharedArrayBuffer(4));
try {

@@ -94,2 +95,3 @@ if (depthFirstOrder) {

let _error;
const _handle = new Int32Array(new SharedArrayBuffer(4));

@@ -110,3 +112,3 @@ new Promise(() => {

parser.write(req.json.raw.body).close();
});
}).catch(new Function());

@@ -152,2 +154,3 @@ Atomics.wait(_handle, 0, 0);

);
req.json.entropy = getEntropy(req.json.raw.body);

@@ -154,0 +157,0 @@ next();

{
"name": "body-fingerprint",
"version": "1.3.7",
"version": "1.4.0",
"description": "Tracks consumers by POST body",

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

@@ -164,2 +164,10 @@ # body-fingerprint

## Entropy
A property value representing Shannon entropy. `null` by default
- For multipart access through `req.multipart.entropy`
- For JSON access through `req.json.entropy`
## Test

@@ -166,0 +174,0 @@

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