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

Speckle Monitoring cannot handle postgres connection string with special characters #1118

Closed
iainsproat opened this issue Oct 17, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@iainsproat
Copy link
Contributor

What package are you referring to?

Monitor (for the postgres database)

Describe the bug

Given a Postgres connection string which includes a % in the username or password.

Speckle monitoring will fail with:

ERROR:__main__:Error: invalid dsn: invalid percent-encoded token: "<REDACTED>"

This seems to be a limitation with psycopg2 library used in Speckle Monitoring. This library is attempting to interpret the % as the start of a url-encoded character. In our case the following characters do not constitute a valid url-encoded character.

To Reproduce

See above description.

Expected behavior

Speckle monitoring can connect to a database without error, even when username and password include special characters.

Screenshots

Additional context

Proposed Solution (if any)

This is not a limitation with the node libraries, so it does not seem advisable to url encode the connection string at the point of input. Instead we should bring Speckle Monitoring's behaviour closer to that of the node libraries by url encoding the %.

Optional: Affected Projects

@iainsproat iainsproat added the bug Something isn't working label Oct 17, 2022
@iainsproat
Copy link
Contributor Author

@iainsproat iainsproat closed this as not planned Won't fix, can't repro, duplicate, stale Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant