Add sandbox attribute to the secureiframe

pull/1/head
yflory 3 years ago
parent 2b6310134b
commit b2e71d9580

@ -517,6 +517,7 @@ define([
if (!thumb64) { return; } if (!thumb64) { return; }
thumb = thumb64; thumb = thumb64;
})); }));
if (file.type === "application/pdf") { return; }
MT.preview(buffer, { MT.preview(buffer, {
type: file.type, type: file.type,
}, void 0, w(function (err, el) { }, void 0, w(function (err, el) {

@ -28,7 +28,7 @@ define([
}; };
window.rc = requireConfig; window.rc = requireConfig;
window.apiconf = ApiConfig; window.apiconf = ApiConfig;
$('#sbox-secure-iframe').attr('src', $('#sbox-secure-iframe').attr('sandbox', 'allow-scripts allow-popups allow-modals').attr('src',
ApiConfig.httpSafeOrigin + '/secureiframe/inner.html?' + requireConfig.urlArgs + ApiConfig.httpSafeOrigin + '/secureiframe/inner.html?' + requireConfig.urlArgs +
'#' + encodeURIComponent(JSON.stringify(req))); '#' + encodeURIComponent(JSON.stringify(req)));

Loading…
Cancel
Save