diff --git a/changelogs/fragments/2349-jira-bugfix-b64decode.yml b/changelogs/fragments/2349-jira-bugfix-b64decode.yml new file mode 100644 index 0000000000..41a1dabb94 --- /dev/null +++ b/changelogs/fragments/2349-jira-bugfix-b64decode.yml @@ -0,0 +1,2 @@ +bugfixes: + - jira - fixed error when loading base64-encoded content as attachment (https://github.com/ansible-collections/community.general/pull/2349). diff --git a/plugins/modules/web_infrastructure/jira.py b/plugins/modules/web_infrastructure/jira.py index d7c88c01b8..3c1a8a27c9 100644 --- a/plugins/modules/web_infrastructure/jira.py +++ b/plugins/modules/web_infrastructure/jira.py @@ -596,7 +596,7 @@ def _prepare_attachment(filename, content=None, mime_type=None): content = f.read() else: try: - content = base64.decode(content) + content = base64.b64decode(content) except binascii.Error as e: raise Exception("Unable to base64 decode file content: %s" % e)