Repository navigation
Conversation
GitHub issue #1923 bookmarkablePageDecryptMultipleCryptoMapper, pageInstanceDecryptMultipleCryptoMapper and the second half of mountedPageRequestListenerParameter wrapped the test mapper in a second CryptoMapper built from the application. That outer mapper used the default KeyInSessionSunJceCryptFactory, which generates a random key per session, and first tried to decrypt the URL the inner mapper had encrypted with a different key. PBEWithMD5AndDES has no integrity check: in about 1 in 256 runs the wrong-key plaintext ends in valid PKCS#5 padding, decryptUrlSafe returns garbage instead of null, and the inner mapper cannot map the resulting URL. Repeated 2000 times, the page instance test failed 7 times, on Java 17 and 25 alike, and CI has hit all three tests on 10.x and 9.x. The outer mapper now gets its own fixed SunJceCrypt key, so the wrong-key decryption gives the same result in every run. Only the test changes; master and 11.x use authenticated AES-GCM, where a wrong key always fails, and are not affected. Generated-by: Claude Code (Claude Opus 5.5)
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 the intermittent
CryptoMapperTestfailures analysed in #1923. The change is test-only.bookmarkablePageDecryptMultipleCryptoMapper,pageInstanceDecryptMultipleCryptoMapperand the second half ofmountedPageRequestListenerParameterwrapped the test mapper in a secondCryptoMapperbuilt from the application. That outer mapper uses the defaultKeyInSessionSunJceCryptFactory, which generates a random key per session.PBEWithMD5AndDES has no integrity check. In about 1 in 256 runs, decrypting the inner mapper's URL with that wrong key yields valid padding, so the outer mapper passes on a garbage URL instead of
null. The outer mapper now gets its own fixedSunJceCryptkey, so the result is the same in every run.Testing:
mvn clean verifyon Java 25 passes.master and 11.x use authenticated AES-GCM, where a wrong key always fails, so they need no change. If a 9.x license cleanup release is cut, this commit should be cherry-picked onto wicket-9.x.
🤖 Generated with Claude Code