Postgres dialect parse password with spaces (#775) #779
No reviewers
Labels
No Label
backport/done
backport/v1
blocked
db
oracle
db
sqlserver
duplicate
feature
cache
frontport/done
frontport/main
invalid
kind
breaking
kind
bug
kind
build
kind
dependencies
kind
docs
kind
driver
kind
enhancement
kind
feature
kind
performance
kind
proposal
kind
question
kind
refactor
kind
testing
need
feedback
need
test
proposal:accepted
RaspBerry Pi
regression
skip-changelog
upstream
wip
wontfix
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: xorm/xorm#779
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "postgres_panic_775"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #775 This fixes two problems - the postgres dialect can parse a password with spaces. If an error occurs the Parse func returns an error instead of panicking.
There are some problems still however:
#
in a password but we handle that in Grafana (where I found this bug) by escaping everything before creating the connection string.The code seems to be based on code from pq from 5 year ago. The current version of pq does a lot more checks when parsing connection strings to handle all these cases - see this PR that fixed the panic problem in pq.
Working on fixing the coverage tests - not sure exactly why are failing yet.
Aha, was a little too aggressive with removing code. Needs to be able to parse opts and not just urls.
Codecov Report
76.56% <66.66%> (+10.38%)
Continue to review full report at Codecov.
@lunny Changes made. Is that what you were thinking?
@daniellee yes and merged.