nolimit-x 1.0.56 → 1.0.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/license.js +13 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nolimit-x",
3
- "version": "1.0.56",
3
+ "version": "1.0.57",
4
4
  "description": "Advanced email sender ",
5
5
  "main": "src/cli.js",
6
6
  "bin": {
package/src/license.js CHANGED
@@ -67,19 +67,22 @@ function checkLicense(workdir) {
67
67
  };
68
68
  }
69
69
 
70
- // 2. Decode the key (supports both base64 and base64url formats)
70
+ // 2. Decode the key
71
+ // New format: base64url(payload).base64url(signature) — dot is in the raw key
72
+ // Old format: base64(base64(payload).base64(signature)) — no dot in raw key
71
73
  let payloadB64, signatureB64;
72
74
  try {
73
- // Try base64url first (new shorter format), then standard base64 (legacy)
74
75
  let inner;
75
- try {
76
- inner = Buffer.from(rawKey, 'base64url').toString('utf8');
77
- } catch {
78
- inner = Buffer.from(rawKey, 'base64').toString('utf8');
79
- }
80
- // If decoding produced garbage, try the other format
81
- if (!inner.includes('.')) {
82
- inner = Buffer.from(rawKey, 'base64').toString('utf8');
76
+ if (rawKey.includes('.')) {
77
+ // New direct format — the key itself is payload.signature
78
+ inner = rawKey;
79
+ } else {
80
+ // Old wrapped format — decode outer base64 first
81
+ try {
82
+ inner = Buffer.from(rawKey, 'base64url').toString('utf8');
83
+ } catch {
84
+ inner = Buffer.from(rawKey, 'base64').toString('utf8');
85
+ }
83
86
  }
84
87
  const dotIdx = inner.indexOf('.');
85
88
  if (dotIdx === -1) {