Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing error if double quote (") character is present in postgreSQL user password #14

Open
nicolas-juteau opened this issue Dec 11, 2023 · 2 comments

Comments

@nicolas-juteau
Copy link

ChirpStack FUOTA server will fail to start if double quote (") character is present in postgreSQL user password.

Dec 11 18:00:25 dev-chirpstack chirpstack-fuota-server[76143]: time="2023-12-11T18:00:25Z" level=warning msg="storage: ping PostgreSQL database error, will retry in 2s" error="parse "postgres://user:XXXXXX*{\"NY+": invalid port ":XXXXXX*{\"NY+" after host"

Escaping the double quote using a \ does not help. Using englobing single quote and leave the double quote character unescaped does not work either.

NOTE: this issue does not occur in chirpstack (latest version). We use the same escaped password and the connection to postgresql database establishes correctly.

@nicolas-juteau
Copy link
Author

nicolas-juteau commented Dec 11, 2023

Used DSN format:

postgres://user:password@server/db?sslmode=require

@nicolas-juteau
Copy link
Author

Just in case others stumble on this issue, a workaround is to use the dsn string format 'user=chirpstack_ns dbname=chirpstack_ns sslmode=disable'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant