Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encoding parameter to json.loads is deprecated and will be removed in Python 3.9 #66592

Closed
tirkarthi opened this issue Jan 18, 2020 · 3 comments · Fixed by ansible-collections/community.general#87
Labels
affects_2.10 This issue/PR affects Ansible v2.10 bug This issue/PR relates to a bug. ipa IPA community python3 support:core This issue/PR relates to code supported by the Ansible Engineering Team.

Comments

@tirkarthi
Copy link
Contributor

SUMMARY

Encoding parameter to json.loads is ignored and deprecated to be removed in Python 3.9.

>>> json.loads(json.dumps({1: 1}), encoding='utf-8')
<stdin>:1: DeprecationWarning: 'encoding' is ignored and deprecated. It will be removed in Python 3.9
{'1': 1}
ISSUE TYPE
  • Bug Report
COMPONENT NAME

ipa

ANSIBLE VERSION

devel branch

STEPS TO REPRODUCE

resp = json.loads(to_text(resp.read(), encoding=charset), encoding=charset)

@ansibot
Copy link
Contributor

ansibot commented Jan 18, 2020

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Jan 18, 2020

@ansibot ansibot added affects_2.10 This issue/PR affects Ansible v2.10 bug This issue/PR relates to a bug. ipa IPA community needs_triage Needs a first human triage before being processed. python3 support:community This issue/PR relates to code supported by the Ansible community. labels Jan 18, 2020
@ansibot
Copy link
Contributor

ansibot commented Mar 30, 2020

Files identified in the description:
None

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot ansibot added support:core This issue/PR relates to code supported by the Ansible Engineering Team. and removed support:community This issue/PR relates to code supported by the Ansible community. labels Mar 30, 2020
Akasurde added a commit to Akasurde/community.general that referenced this issue Apr 1, 2020
Fixes: ansible/ansible#66592

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Akasurde added a commit to ansible-collections/community.general that referenced this issue Apr 1, 2020
Fixes: ansible/ansible#66592

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Akasurde added a commit to Akasurde/ansible that referenced this issue Apr 1, 2020
Backport of ansible-collections/community.general#87

Fixes: ansible#66592

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Akasurde added a commit to Akasurde/ansible that referenced this issue Apr 1, 2020
Backport of ansible-collections/community.general#87

Fixes: ansible#66592

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
@sivel sivel removed the needs_triage Needs a first human triage before being processed. label Apr 1, 2020
mattclay pushed a commit that referenced this issue Apr 15, 2020
Backport of ansible-collections/community.general#87

Fixes: #66592

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Apr 29, 2020
v2.9.7
======

Minor Changes
-------------

- 'Edit on GitHub' link for plugin, cli documentation fixed to navigate to correct plugin, cli source.
- Handle get_tags_for_object API correctly in vmware_rest_client.
- Remove redundant encoding in json.load call in ipa module_utils (ansible/ansible#66592).
- ansible-test - Upgrade OpenSUSE containers to use Leap 15.1.
- ansible-test now supports testing against RHEL 7.8 when using the ``--remote`` option.
- vmware_cluster - Document alternatives for deprecated parameters

Removed Features (previously deprecated)
----------------------------------------

- ldap_attr, ldap_entry - The ``params`` option has been removed in Ansible-2.10 as it circumvents Ansible's option handling.  Setting ``bind_pw`` with the ``params`` option was disallowed in Ansible-2.7, 2.8, and 2.9 as it was insecure.  For information about this policy, see the discussion at: https://meetbot.fedoraproject.org/ansible-meeting/2017-09-28/ansible_dev_meeting.2017-09-28-15.00.log.html This fixes CVE-2020-1746

Bugfixes
--------

- **security issue** - The ``subversion`` module provided the password via the svn command line option ``--password`` and can be retrieved from the host's /proc/<pid>/cmdline file. Update the module to use the secure ``--password-from-stdin`` option instead, and add a warning in the module and in the documentation if svn version is too old to support it. (CVE-2020-1739)

- **security issue** win_unzip - normalize paths in archive to ensure extracted files do not escape from the target directory (CVE-2020-1737)

- **security_issue** - create temporary vault file with strict permissions when editing and prevent race condition (CVE-2020-1740)
- Alter task_executor's start_connection to support newer modules from collections which expect to send task UUID.
- Ansible.ModuleUtils.WebRequest - actually set no proxy when ``use_proxy: no`` is set on a Windows module - ansible/ansible#68528
- Ensure DataLoader temp files are removed at appropriate times and that we observe the LOCAL_TMP setting.
- Ensure we don't allow ansible_facts subkey of ansible_facts to override top level, also fix 'deprefixing' to prevent key transforms.
- Ensure we get an error when creating a remote tmp if it already exists. CVE-2020-1733
- Fact Delegation - Add ability to indicate which facts must always be delegated. Primarily for ``discovered_interpreter_python`` right now, but extensible later. (ansible/ansible#61002)
- Fix nxos_lacp replace operation (ansible/ansible#64074).
- Handle equal sign in password while using passwordstore lookup plugin.
- In fetch action, avoid using slurp return to set up dest, also ensure no dir traversal CVE-2019-3828.
- In vmware_guest_network module use appropriate network while creating or reconfiguring (ansible/ansible#65968).
- Log additional messages from persistent connection modules that may be missed if the module fails or returns early.
- `vmware_content_deploy_template`'s `cluster` argument no longer fails with an error message about resource pools.
- ansible command now correctly sends v2_playbook_on_start to callbacks
- ansible-galaxy - Error when install finds a tar with a file that will be extracted outside the collection install directory - CVE-2020-10691
- ansible-galaxy collection - Preserve executable bit on build and preserve mode on install from what tar member is set to - ansible/ansible#68415
- dense callback - fix plugin access to its configuration variables and remove a warning message (ansible/ansible#64628).
- display - Improve method of removing extra new line after warnings so it does not break Tower/Runner (ansible/ansible#68517)
- docker connection plugin - do not prefix remote path if running on Windows containers.
- for those running uids for invalid users (containers), fallback to uid=<uid> when logging fixes
- get_url pass incorrect If-Modified-Since header (ansible/ansible#67417)
- mysql_user - Fix idempotence when long grant lists are used (ansible/ansible#68044)
- os_user_role - Fix os_user_role issue to grant a role in a domain.
- ovirt_storage_domain: fix update_check for warning_low_space
- purefa_snmp - Fix error when deleting a manager and when creating a v2c manager (ansible/ansible#68180)
- rabbitmq_policy - Fix version parsing for RabbitMQ 3.8.
- routeros_facts - Prevent crash of module when ``ipv6`` package is not installed
- setup.ps1 - Fix ``ansible_fqdn`` using the wrong values to build the actual DNS FQDN.
@ansible ansible locked and limited conversation to collaborators Apr 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.10 This issue/PR affects Ansible v2.10 bug This issue/PR relates to a bug. ipa IPA community python3 support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants