Skip to content

Commit

Permalink
Removed eval
Browse files Browse the repository at this point in the history
closes #491
  • Loading branch information
jimmywarting committed Nov 14, 2018
1 parent 72effad commit be09a02
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 26 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,17 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.0.0] - 2018-10-17

- Removed eval to resolve CSP [#465]

## [2.0.0-rc.4] - 2018-10-17

- Don’t throw on module.exports

## [2.0.0-rc.3] - 2018-09-27

- switch export method
- Switch export method

## [2.0.0-rc.2] - 2018-09-26

Expand Down Expand Up @@ -48,3 +52,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[#465]: https://github.com/eligrey/FileSaver.js/issues/465
[#469]: https://github.com/eligrey/FileSaver.js/issues/469
[#470]: https://github.com/eligrey/FileSaver.js/issues/470
[#491]: https://github.com/eligrey/FileSaver.js/issues/491
11 changes: 1 addition & 10 deletions dist/FileSaver.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,7 @@
*/
// The one and only way of getting global scope in all environments
// https://stackoverflow.com/q/3277182/1008999
var _global = function () {
// some use content security policy to disable eval
try {
return Function('return this')() || (42, eval)('this');
} catch (e) {
// every global should have circular reference
// used for checking if someone writes var window = {}; var self = {}
return typeof window === 'object' && window.window === window ? window : typeof self === 'object' && self.self === self ? self : typeof global === 'object' && global.global === global ? global : this;
}
}();
var _global = typeof window === 'object' && window.window === window ? window : typeof self === 'object' && self.self === self ? self : typeof global === 'object' && global.global === global ? global : void 0;

function bom(blob, opts) {
if (typeof opts === 'undefined') opts = {
Expand Down
2 changes: 1 addition & 1 deletion dist/FileSaver.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit be09a02

Please sign in to comment.