Password with special characters are not encoded correctly in URLs
Bug #1967897 reported by
Benjamin FÜHRMANN
This bug affects 4 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kolla-ansible |
In Progress
|
Undecided
|
Benjamin FÜHRMANN |
Bug Description
In various configuration file in OpenStack and side services, URL can be declared to access to database or RabbitMQ.
If you use special characters like `#` or `/` in the password, then the URL is not declared as expected and related service can't load correctly the URL, causing connection/
To fix that issue, we can use the `urlencode` filter in Ansible to encode the password.
Example:
```
[database]
connection = mysql+pymysql://{{ ironic_
```
Changed in kolla-ansible: | |
assignee: | nobody → Benjamin FÜHRMANN (fuhrmannb) |
To post a comment you must log in.
Note that we have to also encode slashes manually, Jinja does not do it in `urlencode` method. See [related Jinja2 issue](https:/ /github. com/pallets/ jinja/issues/ 515).
Final Example:
``` database_ user }}:{{ ironic_ database_ password | urlencode | replace('/', '%2f') }}@{{ ironic_ database_ address }}/{{ ironic_ database_ name }}
[database]
connection = mysql+pymysql://{{ ironic_
```