Skip to content

Commit

Permalink
remove use of eval() / Function() which was making web3.js incompatib…
Browse files Browse the repository at this point in the history
…le with Content Security Policy, Trusted Types and other XSS prevention measures
  • Loading branch information
Zemnmez committed Jan 25, 2022
1 parent 115c3a9 commit c1ecc92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/web3-core-requestmanager/src/givenProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ var givenProvider = null;
/* jshint ignore:start */
var global;
try {
global = Function('return this')();
global = function() { return this };
} catch (e) {
global = window;
}
Expand Down

0 comments on commit c1ecc92

Please sign in to comment.