mirror of
https://github.com/ONLYOFFICE/desktop-apps.git
synced 2026-02-10 18:05:16 +08:00
Merge pull request 'fix bug 77998' (#512) from fix/bug-77998 into fix/bug-74837
This commit is contained in:
@ -244,7 +244,6 @@ window.DialogConnect = function(params) {
|
|||||||
resolve({status:'skipped', response: {statusText: _url}});
|
resolve({status:'skipped', response: {statusText: _url}});
|
||||||
else {
|
else {
|
||||||
|
|
||||||
const matches = (e) => (provider === 'onlyoffice' ? ['onlyoffice', 'teamlab'] : [provider]).some(p => (e.responseText || '').toLowerCase().includes(p) || portal.toLowerCase().includes(p));
|
|
||||||
let fetchFuntion = $.ajax;
|
let fetchFuntion = $.ajax;
|
||||||
if (window.AscSimpleRequest && window.AscSimpleRequest.createRequest)
|
if (window.AscSimpleRequest && window.AscSimpleRequest.createRequest)
|
||||||
fetchFuntion = window.AscSimpleRequest.createRequest;
|
fetchFuntion = window.AscSimpleRequest.createRequest;
|
||||||
@ -261,11 +260,6 @@ window.DialogConnect = function(params) {
|
|||||||
// skip checking response for tests
|
// skip checking response for tests
|
||||||
// if ( !_model.entryPage )
|
// if ( !_model.entryPage )
|
||||||
// JSON.parse(e.responseText)
|
// JSON.parse(e.responseText)
|
||||||
|
|
||||||
if (!matches(e)) {
|
|
||||||
reject({status:'invalid portal', response:e});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
resolve({status:status, response:e});
|
resolve({status:status, response:e});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user