Repository navigation
Compare usage sharing keys in the root locale - #83
Merged
Merged
Conversation
…ing parameters, read keys without regard to case, and keep one tracker cache
This was referenced Nov 10, 2026
Merged
#62 brought the two sharing options, the one tracker cache and the key handling this branch held, so every file this branch changed takes rc's version.
Lower-casing in the default locale turns I into a dotless i under a Turkish or Azeri locale, so ID.EMAIL did not match the never-shared key id.email and was shared.
jwrosewell
marked this pull request as ready for review
November 14, 2026 10:36
This was referenced Nov 14, 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.
Problem
EvidenceKeyFilterShareUsagedecides which Evidence the usage sharing element sends. Onrcat 30e4886 it lower-cases each key withkey.toLowerCase()at line 192, and the blocked headers, the query string parameters and the session cookie name at lines 170, 172 and 178, all in the default locale of the JVM. Under a Turkish or Azeri default locale a capital I lower-cases to a dotless i (U+0131), soID.EMAILbecomesıd.emaıl, does not match the never-shared keyid.email, and is shared.HEADER.COOKIEandID.SALTget through the same way, and so does a blocked header written with a capital I.What the specification says
The Shared Evidence section of the usage sharing element specification, at 6570727d on the specifications
mainbranch, says "Keys are compared without regard to case", and that the filter "MUST return false (i.e. not shared) for these keys, matched as the whole key or after a., whatever the configuration and even when all Evidence is shared", listingid.email,id.salt,request-query,request-pathandheader.cookie. A comparison that depends on the default locale is not one without regard to case, because it gives a different answer in some locales.What changed
The four calls lower-case in
Locale.ROOT, which gives the same answer in every locale. Nothing else in the filter changes.This draft first held the two sharing options, one tracker cache and the key handling of the usage sharing element. #62 brought all of those into
rc(cf7e5e2), sorcwas merged in at dfd2aea with a merge commit takingrc's version of every file this branch had changed. After that merge the branch's tree was the same asrc's, and the two commits after it are the whole change.Tests
861b42a6 adds
ShareUsageOptionsTests.neverSharedKeys_TurkishLocale_StillRefused, which sets the default locale to tr-TR and checks thatID.EMAIL,Query.ID.Email,HEADER.COOKIE,Server.Request-Path,SERVER.REQUEST-QUERYandID.SALTare refused by a filter with the default options and by one that shares all Evidence. 61eb4ade is the fix.ShareUsageOptionsTestsonubuntu-latestwith the runner's Java 17.0.21 and Maven 3.10.0. 1 of 9 failed, the new test, with "ID.EMAIL ==> expected: but was: ".Full build
Run 43519926331 built 61eb4ad merged with
rc(30e4886) on nine configurations, Ubuntu x64 with Java 8, 11, 17 and 21, Ubuntu arm64 with Java 17, and Windows with Java 8, 11, 17 and 21, and every job passed. Each of its tenSetting 'PullRequestSha'lines names 61eb4ad, and its Configure job printed "Left out 6 macOS entries".macOS was left out of this draft's full build under the 9 November decision. The rc head is built with macOS before it merges into main.
What remains
Outside this file, 72 other calls in 20 files under
src/mainchange case in the default locale onrcat ceab088, among themFlowDataDefault,PipelineBuilder,JsonBuilderElementand the cloud engines. They are not about what is shared, so #135 passesLocale.ROOTto every one of them, with a check on every pull request that keeps it so. #135 also makes the same four changes and adds the same import toEvidenceKeyFilterShareUsage.javaas this draft, line for line, so the two merge in either order without a conflict.