clickhouse icon indicating copy to clipboard operation
clickhouse copied to clipboard

SpecialChars in user password result in Uri malformed

Open andrelec1 opened this issue 4 years ago • 2 comments

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...

andrelec1 avatar Jun 21 '21 11:06 andrelec1

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

TimonKK avatar Jun 21 '21 11:06 TimonKK

simple

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

image

andrelec1 avatar Jun 22 '21 08:06 andrelec1