fix: correct license key part count validation (5 not 6)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -11,7 +11,7 @@ const SECRET = process.env.LICENSE_SECRET || "";
|
|||||||
function validateKey(key: string): { valid: boolean; expiry?: string; error?: string } {
|
function validateKey(key: string): { valid: boolean; expiry?: string; error?: string } {
|
||||||
// Format: DENTAL-{24-char-signature}-{YYYY-MM-DD}
|
// Format: DENTAL-{24-char-signature}-{YYYY-MM-DD}
|
||||||
const parts = key.trim().split("-");
|
const parts = key.trim().split("-");
|
||||||
if (parts.length !== 6 || parts[0] !== "DENTAL") {
|
if (parts.length !== 5 || parts[0] !== "DENTAL") {
|
||||||
return { valid: false, error: "Invalid license key format" };
|
return { valid: false, error: "Invalid license key format" };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user