postgres dialect panics if password contains a space #775
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#775
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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?
With the following code (the password should be escaped but isn't):
The parseOpts method panics instead of returning an error.
Would you accept a PR that does the following:
Removes the errorf function that is used in the parseOpts function and that returns an error if the parsing fails.
Please feel free to send a PR.
@lunny are the instructions in CONTRIBUTING.md up to date? Should tests be placed in https://github.com/go-xorm/tests ?
I have a working version with a dialect_postgres_test.go class that tests the Parse function but should the test go here -> https://github.com/go-xorm/tests/blob/master/postgres/postgres_test.go
Also, noticed that the code for parsing is from an old version of pq and it does more than is needed. For example, it parses out a full uri but only the db name is returned. Is it ok to remove that code (for example this)?
It's out date. All tests now merged into this repository. Please add test with your PR.
It's OK to remove unused code.