mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
jira - fixed base64 decode bug (#2349)
* fixed base64 decode bug * added changelog fragment
This commit is contained in:
parent
399c0ef849
commit
8ddb81a36f
2 changed files with 3 additions and 1 deletions
2
changelogs/fragments/2349-jira-bugfix-b64decode.yml
Normal file
2
changelogs/fragments/2349-jira-bugfix-b64decode.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- jira - fixed error when loading base64-encoded content as attachment (https://github.com/ansible-collections/community.general/pull/2349).
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue