Repository navigation
Remove request body from exception message - #30
Merged
Merged
Conversation
added 2 commits
October 20, 2026 13:46
HttpHelper included the full request body in the RuntimeException thrown when a request failed to send. The body contains the product token, the recipient numbers and the message content, so any transport failure that was logged would write these to application logs. The exception message now only contains the URL. The original exception is still attached as the cause. Bump version to 3.0.1.
Verify that the exception thrown when a request fails (connection refused and a non-2xx response) does not contain the product token, the recipient or the message content, in the message or in any cause. Add JUnit 4 as a test dependency and no longer ignore test failures in the Maven build workflow, so that a regression fails the build.
ricosuave73
approved these changes
Oct 20, 2026
added 2 commits
October 20, 2026 14:04
actions/setup-java@v2 fails while restoring the Maven cache ('Cache
service responded with 400') because the legacy cache service it uses
has been retired, so every build job failed before Maven ran.
Use actions/setup-java@v5 and actions/checkout@v4.
Publishing to Maven Central used the OSSRH staging endpoint (s01.oss.sonatype.org), which has been retired. Replace the ossrh Maven profile with one for the Central Portal, using central-publishing-maven-plugin, and use a Central Portal user token (CENTRAL_TOKEN_USERNAME and CENTRAL_TOKEN_PASSWORD secrets) instead of the OSSRH credentials. Also update actions/checkout to v7 and actions/setup-java to v6 in both workflows, as the older versions are deprecated.
ricosuave73
approved these changes
Oct 20, 2026
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.
Authored by Guus H. Beckett.
When a request failed to send (DNS failure, timeout, connection reset, TLS error and so on),
HttpHelper.sendRequestthrew aRuntimeExceptionwhose message contained the complete request body. That body holds the product token, the recipient numbers and the message content (which can include one-time passwords). Anyone able to read the application's logs, crash reports or CI output could therefore recover the product token and personal data.Changes
HttpHelper: the exception message now only contains the URL (Error sending request to url: <url>). The original exception is still attached as the cause, so the underlying failure remains visible.MessagingClientErrorTest, which asserts that neither the product token, the recipient nor the message content appear in the exception message or any of its causes, for both a refused connection and an HTTP 500 response. The tests fail against the previous code.actions/checkoutandactions/setup-javain the build and publish workflows. The oldsetup-java@v2failed while restoring the Maven cache, so every build job failed before Maven ran.central-publishing-maven-plugin) instead of the retired OSSRH endpoint. TheossrhMaven profile is replaced by acentralprofile, and the workflow now needsCENTRAL_TOKEN_USERNAMEandCENTRAL_TOKEN_PASSWORDrepository secrets (a Central Portal user token). The publish workflow can only be fully tested by creating a release.pom.xmland theREADME.mddependency snippet.CHANGELOG.md.Notes