handlebars-source 3.0.7 → 3.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of handlebars-source might be problematic. Click here for more details.

Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/handlebars.js +16 -8
  3. data/handlebars.runtime.js +5 -2
  4. metadata +3 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f2aea31d96911fa9f0eddc2a856fc1aa07b6778e9d3132050f202ca61dcddb97
4
- data.tar.gz: ec81549d2997bc8ccaf2930681094a59a6c2c90600f52ffde5fb0d38d454b8ef
3
+ metadata.gz: ff83f09a7e881e2c72d9e887460b22ce89dd07044af6d29e1def69e8fdfb8ea5
4
+ data.tar.gz: 586503d8604d486169e02026415366ff2909113a7cfc3bf801196673cac55d42
5
5
  SHA512:
6
- metadata.gz: 1f67f4a247aaedd175cbabd39f2d8f787372029d0abc13e84e1c69f28c4c4f1bed8c99f69b510b08a57e7d0f549b19dfa16a048c9b538345a644fbe05d4ee78b
7
- data.tar.gz: 9d30838812c234dc398c7b66818ff6e34635c9cde532f58145d25005267af4d51f34ce7710016deea152e30b78ed452106011e111094ca76cc19cbd8caaba0b6
6
+ metadata.gz: 0dcba16cc0aef31b2ea990cf9679b303f9dc8dc65f57b096138657f47874d41e4bc1a2e1a191830554d8e7a0c41508194d6d069af8c5f2da8d3e314eab96dbd0
7
+ data.tar.gz: 2b2245e7c5bac253b7660249c29c40617dd05ccf04a423355fae29daad082cf0e65c9106268a0c49e139da37af1858de27aa61acbb7e8725f9f0f8c679b1648d
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
 
3
- handlebars v3.0.7
3
+ handlebars v3.0.8
4
4
 
5
5
  Copyright (C) 2011-2014 by Yehuda Katz
6
6
 
@@ -497,7 +497,7 @@ return /******/ (function(modules) { // webpackBootstrap
497
497
  if (!obj) {
498
498
  return obj;
499
499
  }
500
- if (field === 'constructor' && !obj.propertyIsEnumerable(field)) {
500
+ if (Utils.dangerousPropertyRegex.test(String(field)) && !Object.prototype.hasOwnProperty.call(obj, field)) {
501
501
  return undefined;
502
502
  }
503
503
  return obj[field];
@@ -656,6 +656,9 @@ return /******/ (function(modules) { // webpackBootstrap
656
656
  return (contextPath ? contextPath + '.' : '') + id;
657
657
  }
658
658
 
659
+ var dangerousPropertyRegex = /^(constructor|__defineGetter__|__defineSetter__|__lookupGetter__|__proto__)$/;
660
+ exports.dangerousPropertyRegex = dangerousPropertyRegex;
661
+
659
662
  /***/ }),
660
663
  /* 6 */
661
664
  /***/ (function(module, exports, __webpack_require__) {
@@ -2971,13 +2974,18 @@ return /******/ (function(modules) { // webpackBootstrap
2971
2974
  // PUBLIC API: You can override these methods in a subclass to provide
2972
2975
  // alternative compiled forms for name lookup and buffering semantics
2973
2976
  nameLookup: function nameLookup(parent, name /* , type*/) {
2974
- if (name === 'constructor') {
2975
- return ['(', parent, '.propertyIsEnumerable(\'constructor\') ? ', parent, '.constructor : undefined', ')'];
2977
+ if (_utils.dangerousPropertyRegex.test(name)) {
2978
+ var isOwnProperty = [this.aliasable('Object.prototype.hasOwnProperty'), '.call(', parent, ',', JSON.stringify(name), ')'];
2979
+ return ['(', isOwnProperty, '?', _actualLookup(), ' : undefined)'];
2976
2980
  }
2977
- if (JavaScriptCompiler.isValidJavaScriptVariableName(name)) {
2978
- return [parent, '.', name];
2979
- } else {
2980
- return [parent, "['", name, "']"];
2981
+ return _actualLookup();
2982
+
2983
+ function _actualLookup() {
2984
+ if (JavaScriptCompiler.isValidJavaScriptVariableName(name)) {
2985
+ return [parent, '.', name];
2986
+ } else {
2987
+ return [parent, '[', JSON.stringify(name), ']'];
2988
+ }
2981
2989
  }
2982
2990
  },
2983
2991
  depthedLookup: function depthedLookup(name) {
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
 
3
- handlebars v3.0.7
3
+ handlebars v3.0.8
4
4
 
5
5
  Copyright (C) 2011-2014 by Yehuda Katz
6
6
 
@@ -429,7 +429,7 @@ return /******/ (function(modules) { // webpackBootstrap
429
429
  if (!obj) {
430
430
  return obj;
431
431
  }
432
- if (field === 'constructor' && !obj.propertyIsEnumerable(field)) {
432
+ if (Utils.dangerousPropertyRegex.test(String(field)) && !Object.prototype.hasOwnProperty.call(obj, field)) {
433
433
  return undefined;
434
434
  }
435
435
  return obj[field];
@@ -588,6 +588,9 @@ return /******/ (function(modules) { // webpackBootstrap
588
588
  return (contextPath ? contextPath + '.' : '') + id;
589
589
  }
590
590
 
591
+ var dangerousPropertyRegex = /^(constructor|__defineGetter__|__defineSetter__|__lookupGetter__|__proto__)$/;
592
+ exports.dangerousPropertyRegex = dangerousPropertyRegex;
593
+
591
594
  /***/ }),
592
595
  /* 5 */
593
596
  /***/ (function(module, exports, __webpack_require__) {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: handlebars-source
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.7
4
+ version: 3.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yehuda Katz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-30 00:00:00.000000000 Z
11
+ date: 2020-02-23 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Handlebars.js source code wrapper for (pre)compilation gems.
14
14
  email:
@@ -39,8 +39,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  requirements: []
42
- rubyforge_project:
43
- rubygems_version: 2.7.6
42
+ rubygems_version: 3.0.6
44
43
  signing_key:
45
44
  specification_version: 4
46
45
  summary: Handlebars.js source code wrapper