Permalink
Browse files

[fix] Obfuscate `ActiveXObject` occurrences (#509)

Some corporate firewalls/proxies such as Blue Coat prevent JavaScript
files from being downloaded if they contain the word "ActiveX".
  • Loading branch information...
lpinca authored and darrachequesne committed Oct 23, 2016
1 parent 6187585 commit 7acae3db158099a575c0777d1bad4a3294d6d044
Showing with 1 addition and 4 deletions.
  1. +1 −4 lib/xmlhttprequest.js
View
@@ -1,8 +1,5 @@
// browser shim for xmlhttprequest module
// Indicate to eslint that ActiveXObject is global
/* global ActiveXObject */
var hasCORS = require('has-cors');
module.exports = function (opts) {
@@ -34,7 +31,7 @@ module.exports = function (opts) {
if (!xdomain) {
try {
return new ActiveXObject('Microsoft.XMLHTTP');
return new global[['Active'].concat('Object').join('X')]('Microsoft.XMLHTTP');
} catch (e) { }
}
};

0 comments on commit 7acae3d

Please sign in to comment.