<p dir="auto"><strong>Migrated issue, originally created by Marcin Jabrzyk (<a href="https://github.com/bzyx">@bzyx</a>)</strong></p>
<p dir="auto">Just tried to create URI connection string where user have password with '+' character, SQLAlchemy gives no clue in error and connecting to database using psql works fine.<br>
Example URI:<br>
SQLALCHEMY_DATABASE_URI = "postgresql+psycopg2://user:<a href="mailto:user+@somehosy.somedomain.com">user+@somehosy.somedomain.com</a>:5432/some_db"</p>
<p dir="auto">Output:<br>
sqlalchemy.exc.OperationalError: (OperationalError) FATAL:  password authentication failed for user "user"<br>
FATAL:  password authentication failed for user "user"<br>
None None</p>
<p dir="auto">Changing password to not having '+' works fine.</p>
<p dir="auto"><strong>Migrated issue, originally created by Anonymous</strong></p>
<p dir="auto">AFAIK, '+' symbol only needs to be unquoted to separate form values from URL. But why function _parse_rfc1738_args in sqlalchemy/lib/sqlalchemy/engine/url.py uses unquote_plus on password!? This is wrong, I think.</p>
<p dir="auto">Following lines of code are replacing '+' symbol in password with space causing database connection to eventually fail.</p>
<p dir="auto">if components<a href="'password'">'password'</a> is not None:<br>
components<a href="'password'">'password'</a> = <br>
util.unquote_plus(components<a href="'password'">'password'</a>)</p>