You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
djmcgreal-cc opened this issue
Jan 29, 2025
· 2 comments
· Fixed by #16510
Assignees
Labels
need-helpAssign this label prompts an engineer to check the issue. Only humans may set this.s2Broken use cases or features (with a workaround). Only humans may set this.
Like #15954, some special characters need to be encoded. Coder tries to do this but fails with a misleading error message when the password includes a '?' character. Instead of matching net/url: invalid userinfo, the error is invalid port "%s" after host.
URL encoding beforehand fixes this issue, but if coder wanted to continue to be helpful in this way it could conceivably try to handle this case too.
The text was updated successfully, but these errors were encountered:
matifali
added
s2
Broken use cases or features (with a workaround). Only humans may set this.
need-help
Assign this label prompts an engineer to check the issue. Only humans may set this.
labels
Jan 29, 2025
@mtojek It's mostly working as intended but we could definitely help the user more in this case. We can't really make it perfect, but the current error case handling looks like it could break on a few other special characters as well (like say, a hash symbol).
I'd say let's improve it 👍🏻, and at the very least document how to url encode your user/pass, which avoids problems entirely.
Fixes: #16319
This PR modifies existing escaping logic for special characters in
Postgres password, so it does fail on edge cases like `#` or `$` when
parser recognizes as invalid port.
need-helpAssign this label prompts an engineer to check the issue. Only humans may set this.s2Broken use cases or features (with a workaround). Only humans may set this.
Like #15954, some special characters need to be encoded. Coder tries to do this but fails with a misleading error message when the password includes a '?' character. Instead of matching
net/url: invalid userinfo
, the error isinvalid port "%s" after host
.URL encoding beforehand fixes this issue, but if coder wanted to continue to be helpful in this way it could conceivably try to handle this case too.
The text was updated successfully, but these errors were encountered: