Socket
Socket
Sign inDemoInstall

pg

Package Overview
Dependencies
Maintainers
1
Versions
224
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pg - npm Package Compare versions

Comparing version 6.2.4 to 6.2.5

15

lib/result.js

@@ -10,2 +10,3 @@ /**

var types = require('pg-types');
var escape = require('js-string-escape');

@@ -79,9 +80,9 @@ //result object returned from query

return "\nthis['" +
//fields containing single quotes will break
//the evaluated javascript unless they are escaped
//see https://github.com/brianc/node-postgres/issues/507
//Addendum: However, we need to make sure to replace all
//occurences of apostrophes, not just the first one.
//See https://github.com/brianc/node-postgres/issues/934
fieldName.replace(/'/g, "\\'") +
// fields containing single quotes will break
// the evaluated javascript unless they are escaped
// see https://github.com/brianc/node-postgres/issues/507
// Addendum: However, we need to make sure to replace all
// occurences of apostrophes, not just the first one.
// See https://github.com/brianc/node-postgres/issues/934
escape(fieldName) +
"'] = " +

@@ -88,0 +89,0 @@ "rowData[" + i + "] == null ? null : parsers[" + i + "](rowData[" + i + "]);";

{
"name": "pg",
"version": "6.2.4",
"version": "6.2.5",
"description": "PostgreSQL client - pure javascript & libpq with the same API",

@@ -23,2 +23,3 @@ "keywords": [

"packet-reader": "0.3.1",
"js-string-escape": "1.0.1",
"pg-connection-string": "0.1.3",

@@ -25,0 +26,0 @@ "pg-pool": "1.*",

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