Skip to content

Conversation

MarcialRosales
Copy link
Contributor

@MarcialRosales MarcialRosales commented Aug 22, 2023

This issue, #9059, occurs when the ldap plugin submits a query to retrieve an LDAP attribute and that attribute has a non-ascii character such as ß. When the plugin receives a binary representation of a string with a non-ascii character, it treated as a list of strings when it was a list of characters. It tried to join those characters with string:join function. When this function encounter the non-ascii characters, it failed to concatenate it and threw the exception badarg.

Proposed Changes

Use list comprehensions instead of string:join to produce a string representation of the attribute's value which can be a single string -with only ascii characters or mix of ascii and non-ascii- or multiple strings.

Types of Changes

What types of changes does your code introduce to this project?
Put an x in the boxes that apply

  • Bug fix (non-breaking change which fixes issue #NNNN)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause an observable behavior change in existing systems)
  • Documentation improvements (corrections, new content, etc)
  • Cosmetic change (whitespace, formatting, etc)
  • Build system and/or CI

@MarcialRosales MarcialRosales self-assigned this Aug 22, 2023
@MarcialRosales MarcialRosales force-pushed the fix-9059 branch 2 times, most recently from f975f55 to 539fa15 Compare August 23, 2023 09:00
@MarcialRosales MarcialRosales marked this pull request as ready for review August 23, 2023 09:32
@michaelklishin
Copy link
Collaborator

michaelklishin commented Aug 24, 2023

The effectiveness of this change was confirmed in #9059 by the reporter.

michaelklishin added a commit that referenced this pull request Aug 24, 2023
michaelklishin added a commit that referenced this pull request Aug 24, 2023
@michaelklishin michaelklishin removed this from the 3.12.4 milestone Aug 24, 2023
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

Successfully merging this pull request may close these issues.

2 participants