mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
* fixed base64 decode bug
* added changelog fragment
(cherry picked from commit 8ddb81a36f
)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
0f0eb53efa
commit
1b05e03384
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