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/lib/ansible
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
cli ansible-config dedupe ini plugin entries (#82498) 5 months ago
collections Require `from __future__ import annotations` (#81902) 9 months ago
compat Remove Python `< 3.5` `selectors` fallbacks (#81872) 8 months ago
config Role fixes (#82339) 6 months ago
errors Require `from __future__ import annotations` (#81902) 9 months ago
executor Revert "Fix older external connection plugins without _sub_plugin declaration (#79372)" (#82473) 6 months ago
galaxy [ansible-galaxy] Remove role name conversion when the repo startswith 'ansible-role' (#82508) 5 months ago
inventory Require `from __future__ import annotations` (#81902) 9 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 Add the task info for tombstoned module/action plugins (#82451) 5 months ago
playbook Play recap stats and callbacks for include_role, consolidate with include_tasks (#79260) 5 months ago
plugins Play recap stats and callbacks for include_role, consolidate with include_tasks (#79260) 5 months ago
template Use functools.update_wrapper instead of a copy 8 months ago
utils Remove crypt support from ansible.utils.encrypt (#81721) 5 months ago
vars Role fixes (#82339) 6 months ago
__init__.py Require `from __future__ import annotations` (#81902) 9 months ago
__main__.py Require `from __future__ import annotations` (#81902) 9 months ago
constants.py Require `from __future__ import annotations` (#81902) 9 months ago
context.py Require `from __future__ import annotations` (#81902) 9 months ago
keyword_desc.yml Fix the strategy plugin description in keywords (#82113) 8 months ago
release.py Require `from __future__ import annotations` (#81902) 9 months ago