Delete global.Buffer in preload script
http://electron.atom.io/docs/tutorial/security/#buffer-global
This commit is contained in:
parent
da64cec869
commit
83a9d21d34
|
@ -8,6 +8,8 @@ window.eval = global.eval = () => {
|
||||||
throw new Error('Sorry, Mattermost does not support window.eval() for security reasons.');
|
throw new Error('Sorry, Mattermost does not support window.eval() for security reasons.');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reflect.deleteProperty(global.Buffer); // http://electron.atom.io/docs/tutorial/security/#buffer-global
|
||||||
|
|
||||||
function hasClass(element, className) {
|
function hasClass(element, className) {
|
||||||
var rclass = /[\t\r\n\f]/g;
|
var rclass = /[\t\r\n\f]/g;
|
||||||
if ((' ' + element.className + ' ').replace(rclass, ' ').indexOf(className) > -1) {
|
if ((' ' + element.className + ' ').replace(rclass, ' ').indexOf(className) > -1) {
|
||||||
|
|
Loading…
Reference in a new issue