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/units
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 }'
5 months ago
..
_vendor Require `from __future__ import annotations` (#81902) 9 months ago
ansible_test Remove unused validate-modules unit test code 8 months ago
cli Remove create_new_password parameter in CLI.build_vault_ids (#82066) 8 months ago
config Remove Python 2 compat (via six) from unit tests 8 months ago
errors Remove Python 2.x compat from unit tests (#82109) 8 months ago
executor Revert "Fix older external connection plugins without _sub_plugin declaration (#79372)" (#82473) 6 months ago
galaxy ansible-galaxy - fix exit code for failed role import (#82193) 6 months ago
inventory Remove Python 2 compat (via six) from unit tests 8 months ago
inventory_test_data/group_vars Merge branch 'v2_final' into devel_switch_v2 9 years ago
mock Remove Python 2 compat (via six) from unit tests 8 months ago
module_utils Fix url encoded credentials in netloc (#82552) 5 months ago
modules uri: Handle the "force" parameter properly (#82187) 5 months ago
parsing Remove Python 2 compat (via six) from unit tests 8 months ago
playbook Add the task info for tombstoned module/action plugins (#82451) 6 months ago
plugins Remove unused unit test code 6 months ago
regex Remove Python 2.x compat from unit tests (#82109) 8 months ago
template Remove Python 2.x compat from unit tests (#82109) 8 months ago
utils test_encrypt: remove unreachable assertion (#82570) 5 months ago
vars Remove Python 2 compat (via six) from unit tests 8 months ago
__init__.py Add empty-init code-smell script. (#18406) 8 years ago
requirements.txt Remove Python 3.9 support for the controller (#80973) 12 months ago
test_context.py Require `from __future__ import annotations` (#81902) 9 months ago
test_no_tty.py Require `from __future__ import annotations` (#81902) 9 months ago