mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
![]() Prior to this commit, it was impossible to use a module like dnf with a URL that contains a username with an @ such as an email address username, because: dnf: name: https://foo@example.com:bar@example.com/some.rpm Would cause netloc parsing to fail. However, the following: dnf: name: https://foo%40example.com:bar@example.com/some.rpm Would also fail because ansible would *not* URL-decode the credentials, causing the following to be base64 encoded in the Authorization header: Zm9vJTQwZXhhbXBsZS5jb206YmFyCg== Which decodes to: foo%40example.com:foo Which is *not* the authorized username, and as such, *won't* pass basic auth. With this commit, Ansible's url lib behaves like curl, chromium, wget, etc, and encodes the above to: Zm9vQGV4YW1wbGUuY29tOmJhcgo= Which decodes to: foo@example.com:bar Which will actually pass the HTTP Basic Auth, and is the same behaviour that you will find ie. with: curl -vvI https://foo%40bar:test@example.com 2>&1 |grep Auth | awk '{ print $4 }' |
5 months ago | |
---|---|---|
.. | ||
_vendor | 9 months ago | |
ansible_test | 8 months ago | |
cli | 8 months ago | |
config | 8 months ago | |
errors | 8 months ago | |
executor | 6 months ago | |
galaxy | 6 months ago | |
inventory | 8 months ago | |
inventory_test_data/group_vars | 9 years ago | |
mock | 8 months ago | |
module_utils | 5 months ago | |
modules | 5 months ago | |
parsing | 8 months ago | |
playbook | 6 months ago | |
plugins | 6 months ago | |
regex | 8 months ago | |
template | 8 months ago | |
utils | 5 months ago | |
vars | 8 months ago | |
__init__.py | 8 years ago | |
requirements.txt | 12 months ago | |
test_context.py | 9 months ago | |
test_no_tty.py | 9 months ago |