@@ -9,7 +9,7 @@ const {lintFile} = require("./ESLint/service");
99let openModule , open ; // dynamic import when needed
1010
1111const options = { name : 'Phoenix Code' } ;
12- const licenseFileContent = JSON . stringify ( { licensedDevice : true } ) ;
12+ const licenseFileContent = JSON . stringify ( { } ) ;
1313
1414async function _importOpen ( ) {
1515 if ( open ) {
@@ -310,6 +310,10 @@ function readFileUtf8(p) {
310310async function addDeviceLicense ( ) {
311311 const targetPath = getLicensePath ( ) ;
312312 let command ;
313+ // we should not store any sensitive information in this file as this is world readable. we use the
314+ // device id itself as license key for that machine. the device id is not associated with any cloud credits
315+ // and all entitlements are local to device only for this threat model to work. So stolen device IDs doesn't
316+ // have any meaning.
313317
314318 if ( os . platform ( ) === 'win32' ) {
315319 // Windows: write file and explicitly grant Everyone read rights
@@ -350,8 +354,8 @@ async function isLicensedDevice() {
350354 const targetPath = getLicensePath ( ) ;
351355 try {
352356 const data = await readFileUtf8 ( targetPath ) ;
353- const json = JSON . parse ( data ) ;
354- return json && json . licensedDevice === true ;
357+ JSON . parse ( data ) ;
358+ return true ; // currently, the existence of the file itself is flag. in future, we may choose to add more.
355359 } catch {
356360 // file missing, unreadable, or invalid JSON
357361 return false ;
0 commit comments