-
Notifications
You must be signed in to change notification settings - Fork 636
Open
Labels
Description
Hi,
I created a database like this
users:
- name: step-ca
databases:
- stepca
options: 'SUPERUSER'
I got this random password here
Lgrd}oKjF287_nUn6,=s<:O|
The URI in the secret looks like this:
postgresql://step-ca:Lgrd%7DoKjF287_nUn6,=s%3C%3AO%7C@master-primary.persistence.svc:5432/stepca
But my client does not like it:
Error opening database of Type postgresql: error parsing PostgreSQL DSN: cannot parse `postgresql://step-ca:Lgrd%7DoKjF287_nUn6`: failed to parse as URL (parse "postgresql://step-ca:Lgrd%7DoKjF287_nUn6": invalid port ":Lgrd%7DoKjF287_nUn6" after host)
I reconstructed the uri by myself by url encoding the password with another implementation and now got this:
postgresql://step-ca:Lgrd%7DoKjF287_nUn6%2C%3Ds%3C%3AO%7C@master-primary.persistence.svc:5432/stepca
Now my client is happy. So the difference is
Lgrd%7DoKjF287_nUn6,=s%3C%3AO%7C
Lgrd%7DoKjF287_nUn6%2C%3Ds%3C%3AO%7C
Obviously the comma (,) and equal sign (=) should be escaped as well.