TimonKK / clickhouse

NodeJS client for ClickHouse
Apache License 2.0
221 stars 122 forks source link

SpecialChars in user password result in Uri malformed #88

Open andrelec1 opened 3 years ago

andrelec1 commented 3 years ago

My user password contain a $ and a %. When i run my code i get a (node:64064) UnhandledPromiseRejectionWarning: URIError: URI malformed

I simply manualy url-encode the password and it work ... but i think this need to be done by the lib...

TimonKK commented 3 years ago

Hi, could you please show minimum code example with your case?

andrelec1 commented 3 years ago

simple

const clickhouse = new ClickHouse(
  {
    url: 'http://xxxxxxx',
    port: 8123,
    debug: debugLog,
    basicAuth: {
      username: '%eeeeee%eeeee',
      password: '%eeee$eeeeeee',
    },
  },
);

image