Fix #195, #196, #197: jooby security and correctness fixes#198
Merged
xsalefter merged 2 commits intojobby-fix_deferred_testsfrom Apr 8, 2026
Merged
Fix #195, #196, #197: jooby security and correctness fixes#198xsalefter merged 2 commits intojobby-fix_deferred_testsfrom
xsalefter merged 2 commits intojobby-fix_deferred_testsfrom
Conversation
#195: CsrfHandler no longer echoes attacker token #196: Cookie.Signature uses explicit UTF-8 charset #197: SSIHandler reads managed stream, includes path Agent-Logs-Url: https://github.com/killbill/killbill-commons/sessions/1c6da6eb-b63f-4e6e-a2e2-bb2a2d6f8d27 Co-authored-by: xsalefter <510438+xsalefter@users.noreply.github.com>
Agent-Logs-Url: https://github.com/killbill/killbill-commons/sessions/1c6da6eb-b63f-4e6e-a2e2-bb2a2d6f8d27 Co-authored-by: xsalefter <510438+xsalefter@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
xsalefter
April 8, 2026 16:37
View session
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes three issues from the Copilot code review on PR #194:
Changes
#195 — CsrfHandler: CSRF token leak in error message
Issue | Original review
The error message echoed back the attacker-controlled CSRF token candidate, which could leak sensitive values into responses/logs. Changed to a generic
"Invalid CSRF token"message.#196 — Cookie.Signature: platform-dependent charset
Issue | Original review
secret.getBytes()andvalue.getBytes()used platform default charset, which could produce different HMAC signatures across environments. Both now use explicitStandardCharsets.UTF_8.#197 — SSIHandler: stream variable mismatch and missing error context
Issue | Original review
text()read fromstreaminstead of the managedinvariable in the try-with-resources block — fixed to read frominfile()now explicitly checks for null resource and throwsNoSuchElementExceptionwith the resource path, instead of relying onNullPointerExceptionfromInputStreamReaderNullPointerExceptionfrom the catch clause (no longer needed)Tests added
CsrfHandlerTest— 4 tests: invalid token does not echo candidate, valid token passes through, GET request skips verification, missing token throws 403SSIHandlerTest— 2 tests: missing resource includes path in message, existing resource returns contentTest results
All 929 jooby tests pass, 0 failures (baseline was 923; +6 from new tests).