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.
ansible/test/integration/targets/uri/tasks
Yacht Shaver c7334ea92c
Fix url encoded credentials in netloc (#82552)
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 }'
9 months ago
..
ciphers.yml Allow selection of TLS/SSL ciphers (#78650) 2 years ago
install-socat-and-test-unix-socket.yml Remove py2 support from urls.py (#81880) 1 year ago
main.yml Fix url encoded credentials in netloc (#82552) 9 months ago
redirect-all.yml Use HTTPS instead of HTTP for httpbin tests. (#39457) 7 years ago
redirect-none.yml Fixes for uri integration test. (#79688) 2 years ago
redirect-safe.yml Update the tests to work with new httptester container (#72013) 4 years ago
redirect-urllib2.yml Fixes for uri integration test. (#79688) 2 years ago
return-content.yml Add missing newlines to YAML files (#80031) 2 years ago
unexpected-failures.yml Cleanup write_file method in uri (#76412) 2 years ago
unix-socket.yml Remove py2 support from urls.py (#81880) 1 year ago
use_gssapi.yml Fix FreeBSD HTTP Kerberos setup (#72595) 4 years ago
use_netrc.yml Add missing newlines to YAML files (#80031) 2 years ago