Skip to content

Commit deb2682

Browse files
committed
fix: decrypt license key before sending in license validity check
1 parent f5c584d commit deb2682

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

frontend/components/SupportPage/data/useCheckLicenseValidity.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ export default function useCheckLicenseValidity(forceRequest = false) {
2424
enabled: config.IS_PRO && !!config.KEY && (isNeedValidityCheck || forceRequest),
2525
queryFn: () =>
2626
proxyRequest<CheckUpdateResponse>({
27-
bodyParams: { domain: config.SITE_URL, licenseKey: [config.KEY || ''] },
28-
encrypted: ['bodyParams.licenseKey.0'],
27+
bodyParams: {
28+
domain: config.SITE_URL,
29+
licenseKey: config.KEY ? `decrypt(${config.KEY})` : ''
30+
},
2931
method: 'POST',
3032
url: licenseCheckUrl
3133
}),

0 commit comments

Comments
 (0)