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

ldap_search: make sure to also handle binary strings in Python 3 #7264

Merged
merged 1 commit into from
Sep 15, 2023

Conversation

felixfontein
Copy link
Collaborator

SUMMARY

Fixes #5704
Fixes #7262
Updates #6475

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

ldap_search

@felixfontein felixfontein added the backport-7 Automatically create a backport for the stable-7 branch label Sep 15, 2023
@felixfontein
Copy link
Collaborator Author

@ursetto would be glad if you could try this out.

@felixfontein felixfontein added the check-before-release PR will be looked at again shortly before release and merged if possible. label Sep 15, 2023
@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added bug This issue/PR relates to a bug module module plugins plugin (any type) labels Sep 15, 2023
@ursetto
Copy link

ursetto commented Sep 15, 2023

@felixfontein This seems to have fixed it. Tested with

# Encodes everything (except "dn")
- base64_attributes:
  - '*'
# Encodes just these two binary fields, which is enough to avoid a crash
- base64_attributes:
  - objectGUID
  - objectSid

And finally without base64_attributes, both objectGUID and objectSid return a valid UTF-8 string with replacement characters, like

"objectGUID": "�\u0012\r��\u0001�K��'�\u0010���"

So everything seems to be working as expected.

@felixfontein felixfontein merged commit fc530cd into ansible-collections:main Sep 15, 2023
145 checks passed
@patchback
Copy link

patchback bot commented Sep 15, 2023

Backport to stable-7: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-7/fc530cd3f56d44ba7fef342d4a766c368ee6d419/pr-7264

Backported as #7268

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Sep 15, 2023
Make sure to also handle binary strings in Python 3.

(cherry picked from commit fc530cd)
@felixfontein
Copy link
Collaborator Author

@ursetto thanks a lot for reporting this and for testing!

@felixfontein felixfontein deleted the ldap_search branch September 15, 2023 17:01
felixfontein added a commit that referenced this pull request Sep 15, 2023
… handle binary strings in Python 3 (#7268)

ldap_search: make sure to also handle binary strings in Python 3 (#7264)

Make sure to also handle binary strings in Python 3.

(cherry picked from commit fc530cd)

Co-authored-by: Felix Fontein <felix@fontein.de>
@felixfontein felixfontein removed the check-before-release PR will be looked at again shortly before release and merged if possible. label Sep 17, 2023
etrombly pushed a commit to etrombly/community.general that referenced this pull request Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-7 Automatically create a backport for the stable-7 branch bug This issue/PR relates to a bug module module plugins plugin (any type)
Projects
None yet
3 participants