Skip to content

Does not escape the # character to %23 when in the password #23

@NobleUplift

Description

@NobleUplift

I'm trying to connect to a database with the following URL:

var client = new pg.Client('postgresql://dwuser:<PASSWORD>@dw:5433/dwdev');

dwuser is my data warehouse user, and dw is a network-defined alias of my data warehouse pointing to its IP. The password, port, and database are self-evident. When I try to use this string, I get the following:

Connection failed!  { Error: getaddrinfo ENOTFOUND dwuser dwuser:5432
    at errnoException (dns.js:28:10)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:73:26)
  code: 'ENOTFOUND',
  errno: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: 'dwuser',
  host: 'dwuser',
  port: 5432 }

It recognizes my username as the hostname and does not accept the custom port.

EDIT: It turns out that my data warehouse has a # sign in it. This needs to be escaped to %23 or manually replaced on my end in order to work

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions