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

pg-protocol

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pg-protocol - npm Package Compare versions

Comparing version 1.2.2 to 1.2.3

10

dist/inbound-parser.test.js

@@ -200,3 +200,13 @@ "use strict";

testForMessage(SASLContinueBuffer, expectedSASLContinueMessage);
// this exercises a found bug in the parser:
// https://github.com/brianc/node-postgres/pull/2210#issuecomment-627626084
// and adds a test which is deterministic, rather than relying on network packet chunking
const extendedSASLContinueBuffer = Buffer.concat([SASLContinueBuffer, Buffer.from([1, 2, 3, 4])]);
testForMessage(extendedSASLContinueBuffer, expectedSASLContinueMessage);
testForMessage(SASLFinalBuffer, expectedSASLFinalMessage);
// this exercises a found bug in the parser:
// https://github.com/brianc/node-postgres/pull/2210#issuecomment-627626084
// and adds a test which is deterministic, rather than relying on network packet chunking
const extendedSASLFinalBuffer = Buffer.concat([SASLFinalBuffer, Buffer.from([1, 2, 4, 5])]);
testForMessage(extendedSASLFinalBuffer, expectedSASLFinalMessage);
testForMessage(paramStatusBuffer, expectedParameterStatusMessage);

@@ -203,0 +213,0 @@ testForMessage(backendKeyDataBuffer, expectedBackendKeyDataMessage);

4

dist/parser.js

@@ -219,7 +219,7 @@ "use strict";

message.name = "authenticationSASLContinue" /* authenticationSASLContinue */;
message.data = this.reader.string(length - 4);
message.data = this.reader.string(length - 8);
break;
case 12: // AuthenticationSASLFinal
message.name = "authenticationSASLFinal" /* authenticationSASLFinal */;
message.data = this.reader.string(length - 4);
message.data = this.reader.string(length - 8);
break;

@@ -226,0 +226,0 @@ default:

{
"name": "pg-protocol",
"version": "1.2.2",
"version": "1.2.3",
"description": "The postgres client/server binary protocol, implemented in TypeScript",

@@ -25,3 +25,3 @@ "main": "dist/index.js",

},
"gitHead": "35328807e3612cb267bee86dccb2551ad186624a"
"gitHead": "9e55a7073b46da9f2ab274f1dd356087e2a7d982"
}

@@ -213,4 +213,17 @@ import buffers from './testing/test-buffers'

testForMessage(SASLContinueBuffer, expectedSASLContinueMessage)
// this exercises a found bug in the parser:
// https://github.com/brianc/node-postgres/pull/2210#issuecomment-627626084
// and adds a test which is deterministic, rather than relying on network packet chunking
const extendedSASLContinueBuffer = Buffer.concat([SASLContinueBuffer, Buffer.from([1, 2, 3, 4])])
testForMessage(extendedSASLContinueBuffer, expectedSASLContinueMessage)
testForMessage(SASLFinalBuffer, expectedSASLFinalMessage)
// this exercises a found bug in the parser:
// https://github.com/brianc/node-postgres/pull/2210#issuecomment-627626084
// and adds a test which is deterministic, rather than relying on network packet chunking
const extendedSASLFinalBuffer = Buffer.concat([SASLFinalBuffer, Buffer.from([1, 2, 4, 5])])
testForMessage(extendedSASLFinalBuffer, expectedSASLFinalMessage)
testForMessage(paramStatusBuffer, expectedParameterStatusMessage)

@@ -217,0 +230,0 @@ testForMessage(backendKeyDataBuffer, expectedBackendKeyDataMessage)

@@ -299,7 +299,7 @@ import { TransformOptions } from 'stream'

message.name = MessageName.authenticationSASLContinue
message.data = this.reader.string(length - 4)
message.data = this.reader.string(length - 8)
break
case 12: // AuthenticationSASLFinal
message.name = MessageName.authenticationSASLFinal
message.data = this.reader.string(length - 4)
message.data = this.reader.string(length - 8)
break

@@ -306,0 +306,0 @@ default:

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