mattp5657 opened a new pull request, #4171: URL: https://github.com/apache/iggy/pull/4171
## Which issue does this PR address? Closes #4170 ## Rationale Any account with 3 or more personal access tokens gets back a wrong list from the Node SDK today. The parser tracks its position in the response buffer incorrectly, so it drifts off the correct byte offset after the first token and misreads everything after it. ## What changed? `deserializeToken` computed `bytesRead` as an absolute buffer position instead of a relative length, and guessed whether an expiry field was present from the buffer's remaining length instead of reading it at its fixed offset. Responses with 3+ tokens silently lost trailing entries, or had an entry corrupted with bytes read from the wrong offset. The fix reads the expiry field unconditionally at `pos + 1 + nameLength` (it's always present on the wire, `0` = never-expiring) and computes `bytesRead` as a true relative length. ## Local Execution - Passed - Pre-commit hooks ran ## AI Usage Claude was used in generation of this PR. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
