Rurushu13 opened a new issue, #36688: URL: https://github.com/apache/airflow/issues/36688
### Apache Airflow version Other Airflow 2 version (please specify below) ### If "Other Airflow 2 version" selected, which one? 2.5.1 ### What happened? While we were trying to use a BashOperator that would take our Database URI as an Env variable, we noticed that one of our connection URI's password aren't correctly being masked. The difference we found out between two passwords are, one of them have no special character whereas the other one has exclamation points. Original passphrase is `!Weird!Password^123$` ![image](https://github.com/apache/airflow/assets/110015112/e59ee64f-bc7b-4095-8a46-16a9c12f74cf) In order to confirm that this was indeed the issue, we tried removing any special characters from the password of the errenous one, and it was indeed the issue. Password ended up being masked. ![image](https://github.com/apache/airflow/assets/110015112/f0273f5c-4b93-4a34-8bca-75d26307b5b0) ### What you think should happen instead? The password should be masked even if it has a special character in it. ### How to reproduce 1. Create a BashOperator (honestly I think it would work with any operator) 2. Pass a Connection URI of a database that has special characters (we had issue with `!`) in `env` parameter using `BaseHook.get_connection("Database").get_uri()` 3. Check rendered template of the operator in Airflow UI ### Operating System Ventura 13.5 ### Versions of Apache Airflow Providers _No response_ ### Deployment Virtualenv installation ### Deployment details _No response_ ### Anything else? It occurs every-time. ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org