mirror of
https://github.com/ONLYOFFICE/server.git
synced 2026-04-07 14:04:35 +08:00
Merge branch hotfix/v9.0.3 into develop
This commit is contained in:
@ -101,6 +101,7 @@ const pubsubService = require('./pubsubRabbitMQ');
|
||||
const wopiClient = require('./wopiClient');
|
||||
const queueService = require('./../../Common/sources/taskqueueRabbitMQ');
|
||||
const operationContext = require('./../../Common/sources/operationContext');
|
||||
const runtimeConfigManager = require('./../../Common/sources/runtimeConfigManager');
|
||||
const tenantManager = require('./../../Common/sources/tenantManager');
|
||||
const { notificationTypes, ...notificationService } = require('../../Common/sources/notificationService');
|
||||
const aiProxyHandler = require('./ai/aiProxyHandler');
|
||||
@ -1983,7 +1984,9 @@ exports.install = function(server, callbackFunction) {
|
||||
if (needSaveChanges && !conn.encrypted) {
|
||||
// Send changes to save server
|
||||
let user_lcid = utilsDocService.localeToLCID(conn.lang);
|
||||
yield createSaveTimer(ctx, docId, tmpUser.idOriginal, userIndex, user_lcid, undefined, getIsShutdown());
|
||||
//noDelay=true if the client intentionally closes connection or server shuts down
|
||||
const noDelay = !reason || getIsShutdown();
|
||||
yield createSaveTimer(ctx, docId, tmpUser.idOriginal, userIndex, user_lcid, undefined, noDelay);
|
||||
} else if (needSendStatus) {
|
||||
yield* cleanDocumentOnExitNoChanges(ctx, docId, tmpUser.idOriginal, userIndex);
|
||||
} else {
|
||||
@ -4002,7 +4005,9 @@ exports.install = function(server, callbackFunction) {
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
//Initialize watch here to avoid circular import with operationContext
|
||||
runtimeConfigManager.initRuntimeConfigWatcher(operationContext.global);
|
||||
void aiProxyHandler.getPluginSettings(operationContext.global);
|
||||
};
|
||||
exports.setLicenseInfo = async function(globalCtx, data, original) {
|
||||
|
||||
@ -538,15 +538,7 @@ function* commandOpen(ctx, conn, cmd, outputData, opt_upsertRes, opt_bIsRestore)
|
||||
dataQueue.setCtx(ctx);
|
||||
dataQueue.setCmd(cmd);
|
||||
dataQueue.setToFile('Editor.bin');
|
||||
var priority = constants.QUEUE_PRIORITY_HIGH;
|
||||
var formatIn = formatChecker.getFormatFromString(cmd.getFormat());
|
||||
//decrease pdf, djvu, xps convert priority becase long open time
|
||||
if (constants.AVS_OFFICESTUDIO_FILE_CROSSPLATFORM_PDF === formatIn ||
|
||||
constants.AVS_OFFICESTUDIO_FILE_CROSSPLATFORM_DJVU === formatIn ||
|
||||
constants.AVS_OFFICESTUDIO_FILE_CROSSPLATFORM_XPS === formatIn) {
|
||||
priority = constants.QUEUE_PRIORITY_LOW;
|
||||
}
|
||||
yield* docsCoServer.addTask(dataQueue, priority);
|
||||
yield* docsCoServer.addTask(dataQueue, constants.QUEUE_PRIORITY_HIGH);
|
||||
} else {
|
||||
yield* commandOpenFillOutput(ctx, conn, cmd, outputData, opt_bIsRestore);
|
||||
}
|
||||
@ -735,7 +727,7 @@ function* commandImgurls(ctx, conn, cmd, outputData) {
|
||||
var urlSource = urls[i];
|
||||
var urlParsed;
|
||||
var data = undefined;
|
||||
if (urlSource.startsWith('data:')) {
|
||||
if (urlSource?.startsWith('data:')) {
|
||||
let delimiterIndex = urlSource.indexOf(',');
|
||||
if (-1 != delimiterIndex) {
|
||||
let dataLen = urlSource.length - (delimiterIndex + 1);
|
||||
@ -777,10 +769,10 @@ function* commandImgurls(ctx, conn, cmd, outputData) {
|
||||
}
|
||||
}
|
||||
|
||||
data = yield utilsDocService.fixImageExifRotation(ctx, data);
|
||||
|
||||
var outputUrl = {url: 'error', path: 'error'};
|
||||
if (data) {
|
||||
data = yield utilsDocService.fixImageExifRotation(ctx, data);
|
||||
|
||||
let format = formatChecker.getImageFormat(ctx, data);
|
||||
let formatStr;
|
||||
let isAllow = false;
|
||||
|
||||
Reference in New Issue
Block a user