apache / superset

Apache Superset is a Data Visualization and Data Exploration Platform
https://superset.apache.org/
Apache License 2.0
62.8k stars 13.87k forks source link

Not accepting `*` in a database account password #27764

Open FiiL123 opened 7 months ago

FiiL123 commented 7 months ago

Bug description

A postgres database connection with valid credentials does not work because there is a special character in the password(*).

We tried escaping the password string directly in the URL and in the DB with no change in behavior.

How to reproduce the bug

  1. Add database connection with a password containing *
  2. Try to load schemas in SQL Lab
  3. get an error

Screenshots/recordings

No response

Superset version

3.1.1

Python version

3.10

Node version

I don't know

Browser

Chrome

Additional context

Only error message in logs we get is when requesting schemas when exploring in sqllab. DatabaseRestApi.schemas.error

All of the sqlalchemy libs we use.

flask-sqlalchemy 2.5.1

marshmallow-sqlalchemy 0.28.2

sqlalchemy-dremio 3.0.3

sqlalchemy-utils 0.38.3

sqlalchemy 1.4.51

Checklist

rusackas commented 7 months ago

Pinging @dpgaspar @betodealmeida in case there's good reason for not accepting that particular character.

massynmantel commented 7 months ago

When using tools like Amazon RDS with a Secrets Manager that is rotating the RDS credentials for you, you cannot enforce how strong the password will be. This is going to be a problem in large enterprise environments that have very strict password policies.

soniagtm commented 7 months ago

I also encounter the same issue, particularly when the * is at the end of password in the SQLAlchemy URI.

betodealmeida commented 7 months ago

I'll fix this, thanks for the report!

dwierenga commented 6 months ago

I have the same problem with a password with a % character in it. I've tried using a backslash to escape it and URL-encoding it, to no avail.

wjf136 commented 2 months ago

Facing the same issue. Hit problems with both * and %. Any potential updates on this?