question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No Support for special Characters in Passwords for get_uri() method in DbApiHook

See original GitHub issue

Hello,

I have recently noticed that a lot of connections with certain special characters don’t work with SqlAlchemy as it requires the passwords to be urlencoded when they contain special characters.

Would there be any impact to changing the code at line 81 to urlencode the password like urllib.parse.quote_plus(conn.password) to prevent login failures for special characters?

https://github.com/apache/airflow/blob/dee304b222d355b03794aa063f39e3ee13997730/airflow/hooks/dbapi_hook.py#L72-L88

I initially caught this issue while using the OdbcHook method found here. https://github.com/apache/airflow/blob/dee304b222d355b03794aa063f39e3ee13997730/airflow/providers/odbc/hooks/odbc.py#L198-L204

Happy to create a feature request, I just want to confirm that this issue makes sense.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
NadimYounescommented, Dec 2, 2020

@alokshenoy please go for it, I am super busy the next few weeks, thanks for taking this up. @alokshenoy can you please tag me on the PR or ticket so I can just follow it?

Thanks

1reaction
mik-lajcommented, Dec 2, 2020

@alokshenoy I assigned you to this ticket 🐈‍⬛ 🐈

Read more comments on GitHub >

github_iconTop Results From Across the Web

java - How deal with special characters in GET request for a ...
If the user and password combination is correct the response is a json with some information, else I get a json with {valid:0},...
Read more >
Release Notes — Airflow Documentation
Fix UnboundLocalError when sql is empty list in DbApiHook (#23816) ... For storage of information that does not fit into user / password...
Read more >
special characters in database credentials - Google Groups
Hey all, I've found an issue with SQLDB when developing my application. The URI handling does not allow special characters in database passwords....
Read more >
1566615 – Unable to use special characters in HTTPS proxy ...
Monkey patch rest-client to support percent encoded proxy user/password. (2.06 KB, patch) 2018-07-24 18:16 UTC, Joe Rafaniello, no flags ...
Read more >
Airflow Documentation - Read the Docs
Password authentication for users postgres pip install apache-airflow[postgres]. PostgreSQL operators and hook, support as an Airflow b.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found