From 960bdcb265ea4d9bdcfbd769756c7df5cad20995 Mon Sep 17 00:00:00 2001 From: Arman Jivanyan Date: Mon, 13 Jul 2026 10:46:07 +0400 Subject: [PATCH 1/4] add asp.net validation to skip html bit check in license. --- .../lcp_key_validation.test.ts | 25 +++++++++ .../lcp_key_validation/lcp_key_validator.ts | 14 +++-- .../lcp_key_validation/license_info.ts | 14 +++++ .../core/license/license_validation.test.ts | 51 +++++++++++++++++++ .../core/license/license_validation.ts | 17 +++++-- 5 files changed, 115 insertions(+), 6 deletions(-) diff --git a/packages/devextreme/js/__internal/core/license/lcp_key_validation/lcp_key_validation.test.ts b/packages/devextreme/js/__internal/core/license/lcp_key_validation/lcp_key_validation.test.ts index fe8eb8c867d2..49278b396f13 100644 --- a/packages/devextreme/js/__internal/core/license/lcp_key_validation/lcp_key_validation.test.ts +++ b/packages/devextreme/js/__internal/core/license/lcp_key_validation/lcp_key_validation.test.ts @@ -17,6 +17,7 @@ import { createProductInfo } from './product_info'; const DOT_NET_TICKS_EPOCH_OFFSET = 621355968000000000n; const DOT_NET_TICKS_PER_MS = 10000n; const DEVEXTREME_HTML_JS_BIT = 1n << 54n; +const DEVEXTREME_ASPNET_BIT = 1n << 17n; function msToDotNetTicks(ms: number): string { return (BigInt(ms) * DOT_NET_TICKS_PER_MS + DOT_NET_TICKS_EPOCH_OFFSET).toString(); @@ -83,4 +84,28 @@ describe('LCP key validation', () => { expect(token.kind).toBe(TokenKind.verified); }); + + it('does not accept AspNet-only product bit without compatibility mode', () => { + const { parseDevExpressProductKey, TokenKind } = loadParserWithBypassedSignatureCheck(); + const payload = `meta;251,${DEVEXTREME_ASPNET_BIT};`; + + const token = parseDevExpressProductKey(createLcpSource(payload)); + + expect(token.kind).toBe(TokenKind.corrupted); + if (token.kind === TokenKind.corrupted) { + expect(token.error).toBe('product-kind'); + } + }); + + it('accepts AspNet-only product bit in compatibility mode', () => { + const { parseDevExpressProductKey, TokenKind } = loadParserWithBypassedSignatureCheck(); + const payload = `meta;251,${DEVEXTREME_ASPNET_BIT};`; + + const token = parseDevExpressProductKey(createLcpSource(payload), true); + + expect(token.kind).toBe(TokenKind.verified); + if (token.kind === TokenKind.verified) { + expect(token.payload.maxVersionAllowed).toBe(251); + } + }); }); diff --git a/packages/devextreme/js/__internal/core/license/lcp_key_validation/lcp_key_validator.ts b/packages/devextreme/js/__internal/core/license/lcp_key_validation/lcp_key_validator.ts index 126e6b38c740..82d9a767a566 100644 --- a/packages/devextreme/js/__internal/core/license/lcp_key_validation/lcp_key_validator.ts +++ b/packages/devextreme/js/__internal/core/license/lcp_key_validation/lcp_key_validator.ts @@ -13,7 +13,10 @@ import { RSA_PUBLIC_KEY_XML, SIGN_LENGTH, } from './const'; -import { findLatestDevExtremeVersion } from './license_info'; +import { + findLatestDevExtremeVersion, + findLatestDevExtremeVersionWithAspNetCompatibility, +} from './license_info'; import { createProductInfo, type ProductInfo } from './product_info'; import { dotNetTicksToMs, @@ -65,7 +68,10 @@ function productsFromString(encodedString: string): ParsedProducts { } } -export function parseDevExpressProductKey(productsLicenseSource: string): Token { +export function parseDevExpressProductKey( + productsLicenseSource: string, + allowAspNetProductCompatibility = false, +): Token { if (!isProductOnlyLicense(productsLicenseSource)) { return GENERAL_ERROR; } @@ -93,7 +99,9 @@ export function parseDevExpressProductKey(productsLicenseSource: string): Token return errorToken; } - const maxVersionAllowed = findLatestDevExtremeVersion({ products }); + const maxVersionAllowed = allowAspNetProductCompatibility + ? findLatestDevExtremeVersionWithAspNetCompatibility({ products }) + : findLatestDevExtremeVersion({ products }); if (!maxVersionAllowed) { return PRODUCT_KIND_ERROR; diff --git a/packages/devextreme/js/__internal/core/license/lcp_key_validation/license_info.ts b/packages/devextreme/js/__internal/core/license/lcp_key_validation/license_info.ts index a526a3c61983..87138c44ceae 100644 --- a/packages/devextreme/js/__internal/core/license/lcp_key_validation/license_info.ts +++ b/packages/devextreme/js/__internal/core/license/lcp_key_validation/license_info.ts @@ -26,3 +26,17 @@ export function findLatestDevExtremeVersion(info: LicenseInfo): number | undefin return sorted.find((p) => isProduct(p, ProductKind.DevExtremeHtmlJs))?.version; } + +export function findLatestDevExtremeVersionWithAspNetCompatibility( + info: LicenseInfo, +): number | undefined { + if (!isLicenseValid(info)) { + return undefined; + } + + const sorted = [...info.products].sort((a, b) => b.version - a.version); + + return sorted + .find((p) => isProduct(p, ProductKind.DevExtremeHtmlJs, ProductKind.DevExtremeAspNet)) + ?.version; +} diff --git a/packages/devextreme/js/__internal/core/license/license_validation.test.ts b/packages/devextreme/js/__internal/core/license/license_validation.test.ts index 310c260a311f..28f5ba3de591 100644 --- a/packages/devextreme/js/__internal/core/license/license_validation.test.ts +++ b/packages/devextreme/js/__internal/core/license/license_validation.test.ts @@ -3,6 +3,7 @@ import { } from '@jest/globals'; import config from '@js/core/config'; import errors from '@js/core/errors'; +import { fullVersion } from '@js/core/version'; import { base } from '../../ui/overlay/z_index'; import { @@ -11,12 +12,14 @@ import { clearAssertedVersions, } from '../../utils/version'; import { LICENSE_KEY_PLACEHOLDER } from './const'; +import * as productKeyValidator from './lcp_key_validation/lcp_key_validator'; import { parseLicenseKey, setLicenseCheckSkipCondition, validateLicense, } from './license_validation'; import * as trialPanel from './trial_panel.client'; +import { TokenKind } from './types'; jest.mock('./key', () => ({ PUBLIC_KEY: { @@ -583,3 +586,51 @@ describe('assertedVersions integration', () => { }); }); }); + +describe('AspNet compatibility gate', () => { + const LCP_LICENSE = 'LCPv1mock-license'; + + beforeEach(() => { + jest.spyOn(errors, 'log').mockImplementation(() => {}); + jest.spyOn(console, 'warn').mockImplementation(() => {}); + jest.spyOn(trialPanel, 'renderTrialPanel'); + setLicenseCheckSkipCondition(false); + }); + + afterEach(() => { + jest.restoreAllMocks(); + clearAssertedVersions(); + }); + + it('passes AspNet compatibility=true when DevExtreme.AspNet assertion exists', () => { + const parseSpy = jest.spyOn(productKeyValidator, 'parseDevExpressProductKey').mockReturnValue({ + kind: TokenKind.verified, + payload: { + customerId: 'test', + maxVersionAllowed: 999, + format: 1, + }, + }); + + assertDevExtremeVersion('DevExtreme.AspNet.Core', fullVersion); + validateLicense(LCP_LICENSE, fullVersion); + + expect(parseSpy).toHaveBeenCalledWith(LCP_LICENSE, true); + }); + + it('passes AspNet compatibility=false when there is no AspNet assertion', () => { + const parseSpy = jest.spyOn(productKeyValidator, 'parseDevExpressProductKey').mockReturnValue({ + kind: TokenKind.verified, + payload: { + customerId: 'test', + maxVersionAllowed: 999, + format: 1, + }, + }); + + assertDevExtremeVersion('DevExtreme.React', fullVersion); + validateLicense(LCP_LICENSE, fullVersion); + + expect(parseSpy).toHaveBeenCalledWith(LCP_LICENSE, false); + }); +}); diff --git a/packages/devextreme/js/__internal/core/license/license_validation.ts b/packages/devextreme/js/__internal/core/license/license_validation.ts index 48d75c73d4a4..6d4060a82df8 100644 --- a/packages/devextreme/js/__internal/core/license/license_validation.ts +++ b/packages/devextreme/js/__internal/core/license/license_validation.ts @@ -5,6 +5,7 @@ import { fullVersion } from '@js/core/version'; import type { Version } from '../../utils/version'; import { assertedVersionsCompatible, + getAssertedVersions, parseVersion, } from '../../utils/version'; import { @@ -24,14 +25,23 @@ import { } from './types'; let validationPerformed = false; +const ASPNET_ASSERTION_PREFIX = 'devextreme.aspnet'; -export function parseLicenseKey(encodedKey: string | undefined): Token { +function hasAspNetVersionAssertion(): boolean { + return getAssertedVersions() + .some(({ packageName }) => packageName.toLowerCase().startsWith(ASPNET_ASSERTION_PREFIX)); +} + +export function parseLicenseKey( + encodedKey: string | undefined, + allowAspNetProductCompatibility = false, +): Token { if (encodedKey === undefined) { return GENERAL_ERROR; } if (isProductOnlyLicense(encodedKey)) { - return parseDevExpressProductKey(encodedKey); + return parseDevExpressProductKey(encodedKey, allowAspNetProductCompatibility); } return GENERAL_ERROR; @@ -77,7 +87,8 @@ function getLicenseCheckParams({ return { preview, error: 'W0021', warningType: 'old-devextreme-key' }; } - const license = parseLicenseKey(licenseKey); + const allowAspNetProductCompatibility = hasAspNetVersionAssertion(); + const license = parseLicenseKey(licenseKey, allowAspNetProductCompatibility); if (license.kind === TokenKind.corrupted) { if (license.error === 'product-kind') { From cd8c6affdfa41bc0f3251ab8c33c9ba8bb3f4f6c Mon Sep 17 00:00:00 2001 From: Arman Jivanyan Date: Mon, 13 Jul 2026 13:05:51 +0400 Subject: [PATCH 2/4] fix internal signature --- .../core/license/license_validation_internal.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/devextreme/js/__internal/core/license/license_validation_internal.ts b/packages/devextreme/js/__internal/core/license/license_validation_internal.ts index df552c7a8878..6c45c57c6f7d 100644 --- a/packages/devextreme/js/__internal/core/license/license_validation_internal.ts +++ b/packages/devextreme/js/__internal/core/license/license_validation_internal.ts @@ -1,13 +1,14 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ import type { Token } from './types'; -// @ts-expect-error - only for internal usage -export function parseLicenseKey(encodedKey: string | undefined): Token {} +export declare function parseLicenseKey( + encodedKey: string | undefined, + allowAspNetProductCompatibility?: boolean, +): Token; export function validateLicense(licenseKey: string, version?: string): void {} -// @ts-expect-error - only for internal usage -export function peekValidationPerformed(): boolean {} +export declare function peekValidationPerformed(): boolean; export function setLicenseCheckSkipCondition(): void {} From 06a987482004c963447096539e207fceefab37c2 Mon Sep 17 00:00:00 2001 From: Arman Jivanyan Date: Mon, 13 Jul 2026 13:25:56 +0400 Subject: [PATCH 3/4] fix internal signature --- .../core/license/license_validation_internal.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/devextreme/js/__internal/core/license/license_validation_internal.ts b/packages/devextreme/js/__internal/core/license/license_validation_internal.ts index 6c45c57c6f7d..bab460725251 100644 --- a/packages/devextreme/js/__internal/core/license/license_validation_internal.ts +++ b/packages/devextreme/js/__internal/core/license/license_validation_internal.ts @@ -1,14 +1,18 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ import type { Token } from './types'; -export declare function parseLicenseKey( +export function parseLicenseKey( encodedKey: string | undefined, allowAspNetProductCompatibility?: boolean, -): Token; +): Token { + return undefined as unknown as Token; +} export function validateLicense(licenseKey: string, version?: string): void {} -export declare function peekValidationPerformed(): boolean; +export function peekValidationPerformed(): boolean { + return false; +} export function setLicenseCheckSkipCondition(): void {} From e16cde5a003f7e05dc935794e47e9fafdd16ac0d Mon Sep 17 00:00:00 2001 From: Arman Jivanyan Date: Tue, 14 Jul 2026 13:16:44 +0400 Subject: [PATCH 4/4] review changes --- .../lcp_key_validation.test.ts | 53 +++++++++++++ .../lcp_key_validation/lcp_key_validator.ts | 14 ++-- .../lcp_key_validation/license_info.ts | 20 ++--- .../core/license/license_validation.test.ts | 75 ++++++++++++++++++- .../core/license/license_validation.ts | 10 +-- .../license/license_validation_internal.ts | 2 +- 6 files changed, 143 insertions(+), 31 deletions(-) diff --git a/packages/devextreme/js/__internal/core/license/lcp_key_validation/lcp_key_validation.test.ts b/packages/devextreme/js/__internal/core/license/lcp_key_validation/lcp_key_validation.test.ts index 49278b396f13..bc6e4b0b4ca7 100644 --- a/packages/devextreme/js/__internal/core/license/lcp_key_validation/lcp_key_validation.test.ts +++ b/packages/devextreme/js/__internal/core/license/lcp_key_validation/lcp_key_validation.test.ts @@ -18,6 +18,7 @@ const DOT_NET_TICKS_EPOCH_OFFSET = 621355968000000000n; const DOT_NET_TICKS_PER_MS = 10000n; const DEVEXTREME_HTML_JS_BIT = 1n << 54n; const DEVEXTREME_ASPNET_BIT = 1n << 17n; +const DEVEXTREME_COMPLETE_BITS = DEVEXTREME_HTML_JS_BIT | DEVEXTREME_ASPNET_BIT; function msToDotNetTicks(ms: number): string { return (BigInt(ms) * DOT_NET_TICKS_PER_MS + DOT_NET_TICKS_EPOCH_OFFSET).toString(); @@ -108,4 +109,56 @@ describe('LCP key validation', () => { expect(token.payload.maxVersionAllowed).toBe(251); } }); + + it.each([false, true])('accepts HtmlJs-only product bit (acceptAspNetEntitlement=%s)', (acceptAspNetEntitlement) => { + const { parseDevExpressProductKey, TokenKind } = loadParserWithBypassedSignatureCheck(); + const payload = `meta;251,${DEVEXTREME_HTML_JS_BIT};`; + + const token = parseDevExpressProductKey(createLcpSource(payload), acceptAspNetEntitlement); + + expect(token.kind).toBe(TokenKind.verified); + if (token.kind === TokenKind.verified) { + expect(token.payload.maxVersionAllowed).toBe(251); + } + }); + + it.each([ + { acceptAspNetEntitlement: false, expectedVersion: 251 }, + { acceptAspNetEntitlement: true, expectedVersion: 252 }, + ])('selects the correct entitlement for Complete followed by legacy AspNet (acceptAspNetEntitlement=$acceptAspNetEntitlement)', ({ + acceptAspNetEntitlement, + expectedVersion, + }) => { + const { parseDevExpressProductKey, TokenKind } = loadParserWithBypassedSignatureCheck(); + const payload = [ + 'meta', + `251,${DEVEXTREME_COMPLETE_BITS}`, + `252,${DEVEXTREME_ASPNET_BIT}`, + '', + ].join(';'); + + const token = parseDevExpressProductKey(createLcpSource(payload), acceptAspNetEntitlement); + + expect(token.kind).toBe(TokenKind.verified); + if (token.kind === TokenKind.verified) { + expect(token.payload.maxVersionAllowed).toBe(expectedVersion); + } + }); + + it.each([false, true])('selects newer Complete after an older AspNet-only entitlement (acceptAspNetEntitlement=%s)', (acceptAspNetEntitlement) => { + const { parseDevExpressProductKey, TokenKind } = loadParserWithBypassedSignatureCheck(); + const payload = [ + 'meta', + `251,${DEVEXTREME_ASPNET_BIT}`, + `252,${DEVEXTREME_COMPLETE_BITS}`, + '', + ].join(';'); + + const token = parseDevExpressProductKey(createLcpSource(payload), acceptAspNetEntitlement); + + expect(token.kind).toBe(TokenKind.verified); + if (token.kind === TokenKind.verified) { + expect(token.payload.maxVersionAllowed).toBe(252); + } + }); }); diff --git a/packages/devextreme/js/__internal/core/license/lcp_key_validation/lcp_key_validator.ts b/packages/devextreme/js/__internal/core/license/lcp_key_validation/lcp_key_validator.ts index 82d9a767a566..dedc910d1f5c 100644 --- a/packages/devextreme/js/__internal/core/license/lcp_key_validation/lcp_key_validator.ts +++ b/packages/devextreme/js/__internal/core/license/lcp_key_validation/lcp_key_validator.ts @@ -13,10 +13,7 @@ import { RSA_PUBLIC_KEY_XML, SIGN_LENGTH, } from './const'; -import { - findLatestDevExtremeVersion, - findLatestDevExtremeVersionWithAspNetCompatibility, -} from './license_info'; +import { findLatestDevExtremeVersion } from './license_info'; import { createProductInfo, type ProductInfo } from './product_info'; import { dotNetTicksToMs, @@ -70,7 +67,7 @@ function productsFromString(encodedString: string): ParsedProducts { export function parseDevExpressProductKey( productsLicenseSource: string, - allowAspNetProductCompatibility = false, + acceptAspNetEntitlement = false, ): Token { if (!isProductOnlyLicense(productsLicenseSource)) { return GENERAL_ERROR; @@ -99,9 +96,10 @@ export function parseDevExpressProductKey( return errorToken; } - const maxVersionAllowed = allowAspNetProductCompatibility - ? findLatestDevExtremeVersionWithAspNetCompatibility({ products }) - : findLatestDevExtremeVersion({ products }); + const maxVersionAllowed = findLatestDevExtremeVersion( + { products }, + acceptAspNetEntitlement, + ); if (!maxVersionAllowed) { return PRODUCT_KIND_ERROR; diff --git a/packages/devextreme/js/__internal/core/license/lcp_key_validation/license_info.ts b/packages/devextreme/js/__internal/core/license/lcp_key_validation/license_info.ts index 87138c44ceae..5fdeaa037010 100644 --- a/packages/devextreme/js/__internal/core/license/lcp_key_validation/license_info.ts +++ b/packages/devextreme/js/__internal/core/license/lcp_key_validation/license_info.ts @@ -17,26 +17,18 @@ export function getMaxExpiration(info: LicenseInfo): number { return Math.max(...expirationDates); } -export function findLatestDevExtremeVersion(info: LicenseInfo): number | undefined { - if (!isLicenseValid(info)) { - return undefined; - } - - const sorted = [...info.products].sort((a, b) => b.version - a.version); - - return sorted.find((p) => isProduct(p, ProductKind.DevExtremeHtmlJs))?.version; -} - -export function findLatestDevExtremeVersionWithAspNetCompatibility( +export function findLatestDevExtremeVersion( info: LicenseInfo, + acceptAspNetEntitlement = false, ): number | undefined { if (!isLicenseValid(info)) { return undefined; } + const productKinds = acceptAspNetEntitlement + ? [ProductKind.DevExtremeHtmlJs, ProductKind.DevExtremeAspNet] + : [ProductKind.DevExtremeHtmlJs]; const sorted = [...info.products].sort((a, b) => b.version - a.version); - return sorted - .find((p) => isProduct(p, ProductKind.DevExtremeHtmlJs, ProductKind.DevExtremeAspNet)) - ?.version; + return sorted.find((p) => isProduct(p, ...productKinds))?.version; } diff --git a/packages/devextreme/js/__internal/core/license/license_validation.test.ts b/packages/devextreme/js/__internal/core/license/license_validation.test.ts index 28f5ba3de591..80c6f27d1c33 100644 --- a/packages/devextreme/js/__internal/core/license/license_validation.test.ts +++ b/packages/devextreme/js/__internal/core/license/license_validation.test.ts @@ -587,7 +587,7 @@ describe('assertedVersions integration', () => { }); }); -describe('AspNet compatibility gate', () => { +describe('AspNet entitlement gate', () => { const LCP_LICENSE = 'LCPv1mock-license'; beforeEach(() => { @@ -602,7 +602,7 @@ describe('AspNet compatibility gate', () => { clearAssertedVersions(); }); - it('passes AspNet compatibility=true when DevExtreme.AspNet assertion exists', () => { + it('accepts the AspNet entitlement when a DevExtreme.AspNet assertion exists', () => { const parseSpy = jest.spyOn(productKeyValidator, 'parseDevExpressProductKey').mockReturnValue({ kind: TokenKind.verified, payload: { @@ -618,7 +618,7 @@ describe('AspNet compatibility gate', () => { expect(parseSpy).toHaveBeenCalledWith(LCP_LICENSE, true); }); - it('passes AspNet compatibility=false when there is no AspNet assertion', () => { + it('does not accept the AspNet entitlement when there is no AspNet assertion', () => { const parseSpy = jest.spyOn(productKeyValidator, 'parseDevExpressProductKey').mockReturnValue({ kind: TokenKind.verified, payload: { @@ -633,4 +633,73 @@ describe('AspNet compatibility gate', () => { expect(parseSpy).toHaveBeenCalledWith(LCP_LICENSE, false); }); + + it('does not accept the AspNet entitlement for an unrelated package with a matching prefix', () => { + const parseSpy = jest.spyOn(productKeyValidator, 'parseDevExpressProductKey').mockReturnValue({ + kind: TokenKind.verified, + payload: { + customerId: 'test', + maxVersionAllowed: 999, + format: 1, + }, + }); + + assertDevExtremeVersion('DevExtreme.AspNetFake', fullVersion); + validateLicense(LCP_LICENSE, fullVersion); + + expect(parseSpy).toHaveBeenCalledWith(LCP_LICENSE, false); + }); + + it('keeps version mismatch warnings for other packages when accepting the AspNet entitlement', () => { + const parseSpy = jest.spyOn(productKeyValidator, 'parseDevExpressProductKey').mockReturnValue({ + kind: TokenKind.verified, + payload: { + customerId: 'test', + maxVersionAllowed: 999, + format: 1, + }, + }); + + assertDevExtremeVersion('DevExpress.SomeOtherProduct', '1.2.3'); + assertDevExtremeVersion('DevExtreme.AspNet.Core', fullVersion); + validateLicense(LCP_LICENSE, fullVersion); + + expect(errors.log).toHaveBeenCalledWith( + 'W0023', + expect.stringContaining('DevExpress.SomeOtherProduct'), + ); + expect(parseSpy).toHaveBeenCalledWith(LCP_LICENSE, true); + }); + + it('does not revalidate an early JavaScript component after a later AspNet assertion', () => { + const parseSpy = jest.spyOn(productKeyValidator, 'parseDevExpressProductKey').mockReturnValue({ + kind: TokenKind.corrupted, + error: 'product-kind', + }); + + validateLicense(LCP_LICENSE, fullVersion); + assertDevExtremeVersion('DevExtreme.AspNet.Core', fullVersion); + validateLicense(LCP_LICENSE, fullVersion); + + expect(parseSpy).toHaveBeenCalledTimes(1); + expect(parseSpy).toHaveBeenCalledWith(LCP_LICENSE, false); + }); + + it('does not revalidate an early JavaScript component whose license is valid without the AspNet entitlement', () => { + const parseSpy = jest.spyOn(productKeyValidator, 'parseDevExpressProductKey').mockReturnValue({ + kind: TokenKind.verified, + payload: { + customerId: 'test', + maxVersionAllowed: 999, + format: 1, + }, + }); + + validateLicense(LCP_LICENSE, fullVersion); + assertDevExtremeVersion('DevExtreme.AspNet.Core', fullVersion); + validateLicense(LCP_LICENSE, fullVersion); + + expect(parseSpy).toHaveBeenCalledTimes(1); + expect(parseSpy).toHaveBeenCalledWith(LCP_LICENSE, false); + }); }); diff --git a/packages/devextreme/js/__internal/core/license/license_validation.ts b/packages/devextreme/js/__internal/core/license/license_validation.ts index 6d4060a82df8..b5db5f633ecf 100644 --- a/packages/devextreme/js/__internal/core/license/license_validation.ts +++ b/packages/devextreme/js/__internal/core/license/license_validation.ts @@ -25,7 +25,7 @@ import { } from './types'; let validationPerformed = false; -const ASPNET_ASSERTION_PREFIX = 'devextreme.aspnet'; +const ASPNET_ASSERTION_PREFIX = 'devextreme.aspnet.'; function hasAspNetVersionAssertion(): boolean { return getAssertedVersions() @@ -34,14 +34,14 @@ function hasAspNetVersionAssertion(): boolean { export function parseLicenseKey( encodedKey: string | undefined, - allowAspNetProductCompatibility = false, + acceptAspNetEntitlement = false, ): Token { if (encodedKey === undefined) { return GENERAL_ERROR; } if (isProductOnlyLicense(encodedKey)) { - return parseDevExpressProductKey(encodedKey, allowAspNetProductCompatibility); + return parseDevExpressProductKey(encodedKey, acceptAspNetEntitlement); } return GENERAL_ERROR; @@ -87,8 +87,8 @@ function getLicenseCheckParams({ return { preview, error: 'W0021', warningType: 'old-devextreme-key' }; } - const allowAspNetProductCompatibility = hasAspNetVersionAssertion(); - const license = parseLicenseKey(licenseKey, allowAspNetProductCompatibility); + const acceptAspNetEntitlement = hasAspNetVersionAssertion(); + const license = parseLicenseKey(licenseKey, acceptAspNetEntitlement); if (license.kind === TokenKind.corrupted) { if (license.error === 'product-kind') { diff --git a/packages/devextreme/js/__internal/core/license/license_validation_internal.ts b/packages/devextreme/js/__internal/core/license/license_validation_internal.ts index bab460725251..34bca45e56e6 100644 --- a/packages/devextreme/js/__internal/core/license/license_validation_internal.ts +++ b/packages/devextreme/js/__internal/core/license/license_validation_internal.ts @@ -3,7 +3,7 @@ import type { Token } from './types'; export function parseLicenseKey( encodedKey: string | undefined, - allowAspNetProductCompatibility?: boolean, + acceptAspNetEntitlement?: boolean, ): Token { return undefined as unknown as Token; }