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 0.12.1 to 0.12.3

3

lib/connection-parameters.js

@@ -20,3 +20,3 @@ var dns = require('dns');

// url parse expects spaces encoded as %20
str = str.replace(' ', '%20');
str = encodeURI(str);
var result = url.parse(str);

@@ -65,2 +65,3 @@ var config = {};

}
params.push("options=--client_encoding='utf-8'");
dns.lookup(this.host, function(err, address) {

@@ -67,0 +68,0 @@ if(err) return cb(err, null);

@@ -119,2 +119,4 @@ var net = require('net');

.addCString(config.database)
.addCString('options')
.addCString("--client_encoding='utf-8'")
.addCString('').flush();

@@ -121,0 +123,0 @@ //this message is sent without a code

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

@@ -4,0 +4,0 @@ "keywords" : ["postgres", "pg", "libpq", "postgre", "database", "rdbms"],

@@ -152,2 +152,10 @@ var helper = require(__dirname + '/../test-helper');

test('password contains weird characters', function() {
var strang = 'pg://my first name:is&%awesome!@localhost:9000';
var subject = new ConnectionParameters(strang);
assert.equal(subject.user, 'my first name');
assert.equal(subject.password, 'is&%awesome!');
assert.equal(subject.host, 'localhost');
});
});

@@ -26,2 +26,4 @@ require(__dirname + "/test-helper");

.addCString('bang')
.addCString('options')
.addCString("--client_encoding='utf-8'")
.addCString('').join(true))

@@ -28,0 +30,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