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

Git - Add File - 'utf8' codec can't decode byte in position 0: invalid start byte #12

Open
HarlodHolt opened this issue Aug 4, 2023 · 0 comments

Comments

@HarlodHolt
Copy link

HarlodHolt commented Aug 4, 2023

Name of the app
git

Describe the bug
When attempting to use add file to add a file to the repository files that cannot be read into 'utf8' are failing with the expectation "'utf8' codec can't decode byte 0xa5 in position 0: invalid start byte" as an example.

To Reproduce
Steps to reproduce the behavior:

  1. Create Event/Container with a .xlsm file type as a vault artifact
  2. Use Clone repo to bring done repo
  3. Use Add File to move file to repo from vault location
  4. See error

Expected behavior
It appears files that cannot be read are failing with 'utf8' are failing with the expectation "'utf8' codec can't decode byte 0xa5 in position 0: invalid start byte" as an example.

Splunk SOAR Version (please complete the following information):

  • Unprivileged Install - SOAR 5.5
  • OS Version - RHEL 8.7
  • App Version - GIT 2.1.0

Additional context
Modify git_connector.py
changing read_text() to read_bytes() seems to work
255 vault_file_data = vault_file_path.read_text() > vault_file_data = vault_file_path.read_bytes()
271 full_path.write_text(file_data) > full_path.write_bytes(file_data)

I am no expert and not sure what implications this has but this is a viable solution for our instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant