Fix multi-value attribute encoding for non-ASCII characters#95
Fix multi-value attribute encoding for non-ASCII characters#95TharmiganK merged 4 commits intofix-bug-8562from
Conversation
|
|
Co-authored-by: TharmiganK <63336800+TharmiganK@users.noreply.github.com>
Co-authored-by: TharmiganK <63336800+TharmiganK@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## fix-bug-8562 #95 +/- ##
===============================================
Coverage ? 96.66%
===============================================
Files ? 2
Lines ? 30
Branches ? 10
===============================================
Hits ? 29
Misses ? 1
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@copilot Add a change log file similar to this: https://github.com/ballerina-platform/module-ballerina-http/blob/master/changelog.md where you add a one line change and link the issue |
Co-authored-by: TharmiganK <63336800+TharmiganK@users.noreply.github.com>
Added changelog.md with a one-line change note linking to issue #8562 in commit 0cf5bcc. |
Description
When an LDAP attribute has multiple values containing non-ASCII characters, only the first value was returned. The
processAttributemethod was usingattribute.getValueByteArray()(singular) which only returns the first value's byte array, ignoring subsequent values.Changes:
processAttributeto usegetValueByteArrays()(plural) and iterate all values when Base64 encoding is requiredencodeAttributeValueto accept attribute name and byte array separatelyencodeAttributeValueshelper for batch encodingchangelog.mdwith release note entry linking to the issueOne line release note:
Type of change
How Has This Been Tested?
testMultiValueAttributeWithNonAsciitest that creates an entry with multi-valuedescriptionattribute containing Japanese, Greek, and Chinese characters, then verifies all 3 values are returnedTest Configuration:
Checklist:
Security checks
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.