mirror of https://github.com/xwiki-labs/cryptpad
detect misconfiguration and abort
This commit is contained in:
parent
2bffce391a
commit
04486040c3
www/common
|
@ -43,5 +43,14 @@ define([
|
|||
throw e;
|
||||
};
|
||||
|
||||
var caughtEval;
|
||||
try { eval('true'); } catch (err) { caughtEval = true; }
|
||||
|
||||
if (!/^\/(sheet|doc|presentation)/.test(window.location.pathname) && !caughtEval) {
|
||||
return void setTimeout(function () {
|
||||
alert("aborting because eval should not be permitted.");
|
||||
});
|
||||
}
|
||||
|
||||
require([document.querySelector('script[data-bootload]').getAttribute('data-bootload')]);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue