mirror of
https://github.com/ONLYOFFICE/server.git
synced 2026-04-07 14:04:35 +08:00
Try fixing 'licenseKey.pem' not found error
This commit is contained in:
@ -39,6 +39,7 @@ const configL = config.get('license');
|
||||
const constants = require('./constants');
|
||||
const logger = require('./logger');
|
||||
const utils = require('./utils');
|
||||
const path = require('path');
|
||||
const pubsubRedis = require('./../../DocService/sources/pubsubRedis');
|
||||
const redisClient = pubsubRedis.getClientRedis();
|
||||
|
||||
@ -80,7 +81,7 @@ exports.readLicense = function*() {
|
||||
|
||||
const verify = crypto.createVerify('RSA-SHA1');
|
||||
verify.update(JSON.stringify(oLicense));
|
||||
if (verify.verify(fs.readFileSync('./../../Common/sources/licenseKey.pem'), sign, 'hex')) {
|
||||
if (verify.verify(fs.readFileSync(path.join(__dirname, './licenseKey.pem')), sign, 'hex')) {
|
||||
const endDate = new Date(oLicense['end_date']);
|
||||
res.endDate = endDate;
|
||||
const isTrial = (true === oLicense['trial'] || 'true' === oLicense['trial']); // Someone who likes to put json string instead of bool
|
||||
|
||||
Reference in New Issue
Block a user