Bug description

  1. login superset
  2. click "+DATABASE"
  3. choose PostgreSQL
  4. enter host of redshift hostname and port 5439, user name and password BELYGmqy280*(contains a asterisk at the end, the password is auto-generated by redshift)
  5. click "Connect" and error will show

Database Creation Error We are unable to connect to your database. Click "See more" for database-provided information that may help troubleshoot the issue.

See more

  1. click See more, will see "unable to create the database"

my superset version is apachesuperset.docker.scarf.sh/apache/superset:4.0.1

The error disappear when I change the password to one with no special character

Screenshots/recordings

No response

Superset version

4.0.2

Python version

I don't know

Node version

I don't know

Browser

Chrome

Additional context

No response

Checklist

  • [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
  • [ ] I have searched the GitHub issue tracker and didn't find a similar bug report.
  • [ ] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Comment From: dosubot[bot]

Hello @Zhaohe-Ji! I'm a bot designed to help you with bug fixes, answer questions, and guide you on becoming a contributor. I'm here to assist you while you wait for a human maintainer.

I found a similar closed issue where a user faced a problem with special characters in the password for a database connection. The suggested workaround was to use decoded_uri = DATABASE_URI.replace("%", "%%") in line 45 of the superset/migrations/env.py file, which received positive feedback [1].

Additionally, Superset uses an encoding or escaping mechanism for database URIs where colons are escaped with \: to prevent them from being interpreted as bindings to parameters [2]. This might be relevant if your password contains colons or other special characters that need escaping.

You might want to try similar encoding or escaping techniques for the asterisk in your password.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

Comment From: rusackas

Can you check to see if this is happening in 4.1.1 or 5.0? We think this got patched.

Comment From: sfirke

Agreed, specifically by https://github.com/apache/superset/pull/30532.

Comment From: rusackas

Assuming all is well here... closing, but happy to revisit.