mirror of
https://github.com/ONLYOFFICE/server.git
synced 2026-04-07 14:04:35 +08:00
[bug] Fix "WOPISrc" convert param in getConverterHtml
This commit is contained in:
@ -651,7 +651,7 @@ function getConverterHtmlHandler(req, res) {
|
||||
ctx.setDocId(docId);
|
||||
if (!(wopiSrc && access_token && access_token && targetext && docId) ||
|
||||
constants.AVS_OFFICESTUDIO_FILE_UNKNOWN === formatChecker.getFormatFromString(targetext)) {
|
||||
ctx.logger.debug('convert-and-edit-handler invalid params: wopiSrc=%s; access_token=%s; targetext=%s; docId=%s', wopiSrc, access_token, targetext, docId);
|
||||
ctx.logger.debug('convert-and-edit-handler invalid params: WOPISrc=%s; access_token=%s; targetext=%s; docId=%s', wopiSrc, access_token, targetext, docId);
|
||||
utils.fillResponse(req, res, new commonDefines.ConvertStatus(constants.CONVERT_PARAMS), isJson);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -596,7 +596,7 @@ function getConverterHtml(req, res) {
|
||||
let targetext = req.params.targetext;
|
||||
|
||||
if (!(wopiSrc && access_token && access_token_ttl && ext && targetext)) {
|
||||
ctx.logger.debug('convert-and-edit invalid params: wopiSrc=%s; access_token=%s; access_token_ttl=%s; ext=%s; targetext=%s', wopiSrc, access_token, access_token_ttl, ext, targetext);
|
||||
ctx.logger.debug('convert-and-edit invalid params: WOPISrc=%s; access_token=%s; access_token_ttl=%s; ext=%s; targetext=%s', wopiSrc, access_token, access_token_ttl, ext, targetext);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -612,7 +612,7 @@ function getConverterHtml(req, res) {
|
||||
if (docId) {
|
||||
let baseUrl = tenWopiHost || utils.getBaseUrlByRequest(ctx, req);
|
||||
params.statusHandler = `${baseUrl}/hosting/wopi/convert-and-edit-handler`;
|
||||
params.statusHandler += `?wopiSrc=${encodeURI(wopiSrc)}&access_token=${encodeURI(access_token)}`;
|
||||
params.statusHandler += `?${constants.SHARD_KEY_WOPI_NAME}=${encodeURI(wopiSrc)}&access_token=${encodeURI(access_token)}`;
|
||||
params.statusHandler += `&targetext=${encodeURI(targetext)}&docId=${encodeURI(docId)}`;
|
||||
if (tenTokenEnableBrowser) {
|
||||
let tokenData = {docId: docId};
|
||||
|
||||
Reference in New Issue
Block a user