ricardochimal / taps

simple database import/export app
MIT License
1.2k stars 140 forks source link

InvalidURIError with hash character in PG database password. #125

Open dtuite opened 11 years ago

dtuite commented 11 years ago

Bit of a weird problem here. Basically I'm trying to setup a taps server so I can pull the contents of a PG database over HTTP.

The password for the database is constructed like this (notice the # character): 123456#abc.

Whenever I try to start the server with

taps server postgres://localdbuser:localdbpass@localhost/dbname httpuser httppassword

I get a URI::InvalidURIError

URI::InvalidURIError -> the scheme postgres does not accept registry part: localdbuser:123456 (or bad hostname?)

The fact that the error only quotes the password up as far as the # character makes me think that this char is triggering the error. Is there some way I can escape it so it doesn't choke?

esromneb commented 10 years ago

I am also having this issue. For me I have a password with an @ in it. What is the proper way to escape such passwords?

rodfersou commented 8 years ago

This S.O. do the trick http://stackoverflow.com/a/22978703/2116850

Use %40 instead of @ and %23 for #

rodfersou commented 8 years ago

can someone close this issue?