Skip to content

use Locale.ENGLISH for address folding in SignedMailValidator - #2485

Open
rootvector2 wants to merge 1 commit into
bcgit:mainfrom
rootvector2:signed-mail-validator-address-locale
Open

rootvector2 wants to merge 1 commit into
bcgit:mainfrom
rootvector2:signed-mail-validator-address-locale

Conversation

@rootvector2

Copy link
Copy Markdown
Contributor

SignedMailValidator folds both sides of the comparison that ties a signature to the sender the message claims, the certificate's email addresses in getEmailAddresses and the From addresses in hasAnyFromAddress, with Locale.getDefault() captured in a static field at class load, so on a Turkish or Azerbaijani JVM I lower cases to the dotless ı and a legitimately signed message is reported as emailFromCertMismatch while a certificate whose emailAddress attribute carries U+0130 (the attribute is read through ASN1String, not restricted to IA5String) folds onto a different mailbox and satisfies the check for it; found sweeping every module's src/main for case conversion used in a security comparison, which turned up this as the only default-locale one, the JSSE HostnameUtil, BCSNIHostName and DisabledAlgorithmConstraints all fixing Locale.ENGLISH and the EST hostname authorizer using the locale-independent Strings.toLowerCase.

AI tooling was used to help prepare this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant