Skip to content

Strip whitespace from license keys before resolving precedence - #4663

Open
AVTUNEY wants to merge 1 commit into
LuckyPennySoftware:mainfrom
AVTUNEY:fix/4660-license-key-whitespace
Open

AVTUNEY wants to merge 1 commit into
LuckyPennySoftware:mainfrom
AVTUNEY:fix/4660-license-key-whitespace

Conversation

@AVTUNEY

@AVTUNEY AVTUNEY commented Sep 28, 2026 •

Copy link
Copy Markdown

License keys copied from PDFs, email, or secret files can contain whitespace and fail signature validation. Normalize each key source before applying the existing explicit → AutoMapper environment variable → shared environment variable precedence, treating empty and whitespace-only values as unset.

Add 34 regression cases covering trailing and embedded ASCII/Unicode whitespace, precedence, and fallback. All 34 fail against the original resolver and pass with this fix.

Validation:

  • License-key resolution tests: 39 passed.
  • Full unit suite: 1,264 passed; dependency-injection suite: 33 passed.
  • Library builds for netstandard2.0, net8.0, net9.0, and net10.0.
  • SQL Server integration suite: 133 passed.
  • pwsh -NoProfile -File ./Build.ps1: passed (1,430 tests total).

Fixes #4660

Normalize explicit and environment-variable keys, treating blank values as unset. Add regression coverage for whitespace, fallback, and precedence.

Fixes LuckyPennySoftware#4660
@CLAassistant

CLAassistant commented Sep 28, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@AVTUNEY
AVTUNEY marked this pull request as ready for review September 28, 2026 18:00
@jbogard

jbogard commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

@codex review

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.

Strip all whitespace from the license key

3 participants