Skip to content

Special character in PostgreSQL password breaks uri configuration #1044

@Edefritz

Description

@Edefritz

Hi,

I noticed that tegola breaks on startup when the connection uri has a special character with this message:

could not register providers: postgis: parse "postgres://db_user:db^password@my_db_url:5432/db_name": net/url: invalid userinfo

In my specific case I suspect the "^" character leading to the failure. The solution for me is to downgrade to 0.19.0 where passing the connection params as separate properties was still not deprecated. The problematic password doesn't seem to be an issue here. Of course I could change my password but when PostgreSQL allows this as a valid password, so probably should tegola.

Is suppose the underlying go package expects the connection string to be URL encoded somehow (potentially here?)

I found this thread which might be related: https://stackoverflow.com/questions/48671938/go-url-parsestring-fails-with-certain-user-names-or-passwords

If you think this is a valid issue, I'm happy to try my best on a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions