handlebars-source 4.6.0 → 4.7.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of handlebars-source might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/handlebars.js +109 -45
- data/handlebars.runtime.js +88 -24
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0539ea3c6630b1168bfcae1500a9ebe412a6cd9514c927e850f7fff6d078c6e4'
|
4
|
+
data.tar.gz: 8274c670c732b9ac6214eee157353e77e4eac6be78bb83d1c28b3ba3e1c0eeb1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cfedc665313be1ba5df12d125ef60494b3e5526339ad017d07783db1be0658eaeb2664d6f3719ac47a07ab77a85f8009d35bdc810e7bec744bce9285c6ff71b7
|
7
|
+
data.tar.gz: 5114f41be7afc851c58064b62e70dc187c67e65307f6b0ee0d78a0b3b1cec9121cb8cf2aec92db2f525eb797cd1f2a99e089df868a9d46c03657222ac3f9eaa6
|
data/handlebars.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/**!
|
2
2
|
|
3
3
|
@license
|
4
|
-
handlebars v4.
|
4
|
+
handlebars v4.7.0
|
5
5
|
|
6
6
|
Copyright (C) 2011-2019 by Yehuda Katz
|
7
7
|
|
@@ -92,23 +92,23 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
92
92
|
|
93
93
|
// Compiler imports
|
94
94
|
|
95
|
-
var _handlebarsCompilerAst = __webpack_require__(
|
95
|
+
var _handlebarsCompilerAst = __webpack_require__(45);
|
96
96
|
|
97
97
|
var _handlebarsCompilerAst2 = _interopRequireDefault(_handlebarsCompilerAst);
|
98
98
|
|
99
|
-
var _handlebarsCompilerBase = __webpack_require__(
|
99
|
+
var _handlebarsCompilerBase = __webpack_require__(46);
|
100
100
|
|
101
|
-
var _handlebarsCompilerCompiler = __webpack_require__(
|
101
|
+
var _handlebarsCompilerCompiler = __webpack_require__(51);
|
102
102
|
|
103
|
-
var _handlebarsCompilerJavascriptCompiler = __webpack_require__(
|
103
|
+
var _handlebarsCompilerJavascriptCompiler = __webpack_require__(52);
|
104
104
|
|
105
105
|
var _handlebarsCompilerJavascriptCompiler2 = _interopRequireDefault(_handlebarsCompilerJavascriptCompiler);
|
106
106
|
|
107
|
-
var _handlebarsCompilerVisitor = __webpack_require__(
|
107
|
+
var _handlebarsCompilerVisitor = __webpack_require__(49);
|
108
108
|
|
109
109
|
var _handlebarsCompilerVisitor2 = _interopRequireDefault(_handlebarsCompilerVisitor);
|
110
110
|
|
111
|
-
var _handlebarsNoConflict = __webpack_require__(
|
111
|
+
var _handlebarsNoConflict = __webpack_require__(44);
|
112
112
|
|
113
113
|
var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict);
|
114
114
|
|
@@ -194,7 +194,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
194
194
|
|
195
195
|
var runtime = _interopRequireWildcard(_handlebarsRuntime);
|
196
196
|
|
197
|
-
var _handlebarsNoConflict = __webpack_require__(
|
197
|
+
var _handlebarsNoConflict = __webpack_require__(44);
|
198
198
|
|
199
199
|
var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict);
|
200
200
|
|
@@ -276,7 +276,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
276
276
|
|
277
277
|
var _logger2 = _interopRequireDefault(_logger);
|
278
278
|
|
279
|
-
var VERSION = '4.
|
279
|
+
var VERSION = '4.7.0';
|
280
280
|
exports.VERSION = VERSION;
|
281
281
|
var COMPILER_REVISION = 8;
|
282
282
|
exports.COMPILER_REVISION = COMPILER_REVISION;
|
@@ -1309,7 +1309,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1309
1309
|
|
1310
1310
|
var _internalWrapHelper = __webpack_require__(39);
|
1311
1311
|
|
1312
|
-
var
|
1312
|
+
var _internalProtoAccess = __webpack_require__(40);
|
1313
1313
|
|
1314
1314
|
function checkRevision(compilerInfo) {
|
1315
1315
|
var compilerRevision = compilerInfo && compilerInfo[0] || 1,
|
@@ -1358,8 +1358,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1358
1358
|
|
1359
1359
|
var extendedOptions = Utils.extend({}, options, {
|
1360
1360
|
hooks: this.hooks,
|
1361
|
-
|
1362
|
-
allowedProtoProperties: this.allowedProtoProperties
|
1361
|
+
protoAccessControl: this.protoAccessControl
|
1363
1362
|
});
|
1364
1363
|
|
1365
1364
|
var result = env.VM.invokePartial.call(this, partial, context, extendedOptions);
|
@@ -1398,12 +1397,14 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1398
1397
|
},
|
1399
1398
|
lookupProperty: function lookupProperty(parent, propertyName) {
|
1400
1399
|
var result = parent[propertyName];
|
1400
|
+
if (result == null) {
|
1401
|
+
return result;
|
1402
|
+
}
|
1401
1403
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
1402
1404
|
return result;
|
1403
1405
|
}
|
1404
|
-
var whitelist = typeof result === 'function' ? container.allowedProtoMethods : container.allowedProtoProperties;
|
1405
1406
|
|
1406
|
-
if (
|
1407
|
+
if (_internalProtoAccess.resultIsAllowed(result, container.protoAccessControl, propertyName)) {
|
1407
1408
|
return result;
|
1408
1409
|
}
|
1409
1410
|
return undefined;
|
@@ -1486,9 +1487,11 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1486
1487
|
function main(context /*, options*/) {
|
1487
1488
|
return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths);
|
1488
1489
|
}
|
1490
|
+
|
1489
1491
|
main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams);
|
1490
1492
|
return main(context, options);
|
1491
1493
|
}
|
1494
|
+
|
1492
1495
|
ret.isTop = true;
|
1493
1496
|
|
1494
1497
|
ret._setup = function (options) {
|
@@ -1506,15 +1509,13 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1506
1509
|
}
|
1507
1510
|
|
1508
1511
|
container.hooks = {};
|
1509
|
-
container.
|
1510
|
-
container.allowedProtoMethods = _internalCreateNewLookupObject.createNewLookupObject(options.allowedProtoMethods);
|
1512
|
+
container.protoAccessControl = _internalProtoAccess.createProtoAccessControl(options);
|
1511
1513
|
|
1512
1514
|
var keepHelperInHelpers = options.allowCallsToHelperMissing || templateWasPrecompiledWithCompilerV7;
|
1513
1515
|
_helpers.moveHelperToHooks(container, 'helperMissing', keepHelperInHelpers);
|
1514
1516
|
_helpers.moveHelperToHooks(container, 'blockHelperMissing', keepHelperInHelpers);
|
1515
1517
|
} else {
|
1516
|
-
container.
|
1517
|
-
container.allowedProtoMethods = options.allowedProtoMethods;
|
1518
|
+
container.protoAccessControl = options.protoAccessControl; // internal option
|
1518
1519
|
container.helpers = options.helpers;
|
1519
1520
|
container.partials = options.partials;
|
1520
1521
|
container.decorators = options.decorators;
|
@@ -1709,24 +1710,59 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1709
1710
|
|
1710
1711
|
var _Object$create = __webpack_require__(41)['default'];
|
1711
1712
|
|
1713
|
+
var _interopRequireWildcard = __webpack_require__(3)['default'];
|
1714
|
+
|
1712
1715
|
exports.__esModule = true;
|
1713
|
-
exports.
|
1716
|
+
exports.createProtoAccessControl = createProtoAccessControl;
|
1717
|
+
exports.resultIsAllowed = resultIsAllowed;
|
1714
1718
|
|
1715
|
-
var
|
1719
|
+
var _createNewLookupObject = __webpack_require__(43);
|
1716
1720
|
|
1717
|
-
|
1718
|
-
* Create a new object with "null"-prototype to avoid truthy results on prototype properties.
|
1719
|
-
* The resulting object can be used with "object[property]" to check if a property exists
|
1720
|
-
* @param {...object} sources a varargs parameter of source objects that will be merged
|
1721
|
-
* @returns {object}
|
1722
|
-
*/
|
1721
|
+
var _logger = __webpack_require__(32);
|
1723
1722
|
|
1724
|
-
|
1725
|
-
|
1726
|
-
|
1723
|
+
var logger = _interopRequireWildcard(_logger);
|
1724
|
+
|
1725
|
+
function createProtoAccessControl(runtimeOptions) {
|
1726
|
+
var defaultMethodWhiteList = _Object$create(null);
|
1727
|
+
defaultMethodWhiteList['constructor'] = false;
|
1728
|
+
defaultMethodWhiteList['__defineGetter__'] = false;
|
1729
|
+
defaultMethodWhiteList['__defineSetter__'] = false;
|
1730
|
+
defaultMethodWhiteList['__lookupGetter__'] = false;
|
1731
|
+
|
1732
|
+
var defaultPropertyWhiteList = _Object$create(null);
|
1733
|
+
// eslint-disable-next-line no-proto
|
1734
|
+
defaultPropertyWhiteList['__proto__'] = false;
|
1735
|
+
|
1736
|
+
return {
|
1737
|
+
properties: {
|
1738
|
+
whitelist: _createNewLookupObject.createNewLookupObject(defaultPropertyWhiteList, runtimeOptions.allowedProtoProperties),
|
1739
|
+
defaultValue: runtimeOptions.allowProtoPropertiesByDefault
|
1740
|
+
},
|
1741
|
+
methods: {
|
1742
|
+
whitelist: _createNewLookupObject.createNewLookupObject(defaultMethodWhiteList, runtimeOptions.allowedProtoMethods),
|
1743
|
+
defaultValue: runtimeOptions.allowProtoMethodsByDefault
|
1744
|
+
}
|
1745
|
+
};
|
1746
|
+
}
|
1747
|
+
|
1748
|
+
function resultIsAllowed(result, protoAccessControl, propertyName) {
|
1749
|
+
if (typeof result === 'function') {
|
1750
|
+
return checkWhiteList(protoAccessControl.methods, propertyName);
|
1751
|
+
} else {
|
1752
|
+
return checkWhiteList(protoAccessControl.properties, propertyName);
|
1727
1753
|
}
|
1754
|
+
}
|
1728
1755
|
|
1729
|
-
|
1756
|
+
function checkWhiteList(protoAccessControlForType, propertyName) {
|
1757
|
+
if (protoAccessControlForType.whitelist[propertyName] !== undefined) {
|
1758
|
+
return protoAccessControlForType.whitelist[propertyName] === true;
|
1759
|
+
}
|
1760
|
+
if (protoAccessControlForType.defaultValue !== undefined) {
|
1761
|
+
return protoAccessControlForType.defaultValue;
|
1762
|
+
}
|
1763
|
+
// eslint-disable-next-line no-console
|
1764
|
+
logger.log('error', 'Handlebars: Access has been denied to resolve the property "' + propertyName + '" because it is not an "own property" of its parent.\n' + 'You can add a runtime option to disable the check or this warning:\n' + 'See http://localhost:8080/api-reference/runtime-options.html#options-to-control-prototype-access for details');
|
1765
|
+
return false;
|
1730
1766
|
}
|
1731
1767
|
|
1732
1768
|
/***/ }),
|
@@ -1746,6 +1782,34 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1746
1782
|
|
1747
1783
|
/***/ }),
|
1748
1784
|
/* 43 */
|
1785
|
+
/***/ (function(module, exports, __webpack_require__) {
|
1786
|
+
|
1787
|
+
'use strict';
|
1788
|
+
|
1789
|
+
var _Object$create = __webpack_require__(41)['default'];
|
1790
|
+
|
1791
|
+
exports.__esModule = true;
|
1792
|
+
exports.createNewLookupObject = createNewLookupObject;
|
1793
|
+
|
1794
|
+
var _utils = __webpack_require__(5);
|
1795
|
+
|
1796
|
+
/**
|
1797
|
+
* Create a new object with "null"-prototype to avoid truthy results on prototype properties.
|
1798
|
+
* The resulting object can be used with "object[property]" to check if a property exists
|
1799
|
+
* @param {...object} sources a varargs parameter of source objects that will be merged
|
1800
|
+
* @returns {object}
|
1801
|
+
*/
|
1802
|
+
|
1803
|
+
function createNewLookupObject() {
|
1804
|
+
for (var _len = arguments.length, sources = Array(_len), _key = 0; _key < _len; _key++) {
|
1805
|
+
sources[_key] = arguments[_key];
|
1806
|
+
}
|
1807
|
+
|
1808
|
+
return _utils.extend.apply(undefined, [_Object$create(null)].concat(sources));
|
1809
|
+
}
|
1810
|
+
|
1811
|
+
/***/ }),
|
1812
|
+
/* 44 */
|
1749
1813
|
/***/ (function(module, exports) {
|
1750
1814
|
|
1751
1815
|
/* WEBPACK VAR INJECTION */(function(global) {'use strict';
|
@@ -1769,7 +1833,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1769
1833
|
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
|
1770
1834
|
|
1771
1835
|
/***/ }),
|
1772
|
-
/*
|
1836
|
+
/* 45 */
|
1773
1837
|
/***/ (function(module, exports) {
|
1774
1838
|
|
1775
1839
|
'use strict';
|
@@ -1804,7 +1868,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1804
1868
|
module.exports = exports['default'];
|
1805
1869
|
|
1806
1870
|
/***/ }),
|
1807
|
-
/*
|
1871
|
+
/* 46 */
|
1808
1872
|
/***/ (function(module, exports, __webpack_require__) {
|
1809
1873
|
|
1810
1874
|
'use strict';
|
@@ -1817,15 +1881,15 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1817
1881
|
exports.parseWithoutProcessing = parseWithoutProcessing;
|
1818
1882
|
exports.parse = parse;
|
1819
1883
|
|
1820
|
-
var _parser = __webpack_require__(
|
1884
|
+
var _parser = __webpack_require__(47);
|
1821
1885
|
|
1822
1886
|
var _parser2 = _interopRequireDefault(_parser);
|
1823
1887
|
|
1824
|
-
var _whitespaceControl = __webpack_require__(
|
1888
|
+
var _whitespaceControl = __webpack_require__(48);
|
1825
1889
|
|
1826
1890
|
var _whitespaceControl2 = _interopRequireDefault(_whitespaceControl);
|
1827
1891
|
|
1828
|
-
var _helpers = __webpack_require__(
|
1892
|
+
var _helpers = __webpack_require__(50);
|
1829
1893
|
|
1830
1894
|
var Helpers = _interopRequireWildcard(_helpers);
|
1831
1895
|
|
@@ -1862,7 +1926,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1862
1926
|
}
|
1863
1927
|
|
1864
1928
|
/***/ }),
|
1865
|
-
/*
|
1929
|
+
/* 47 */
|
1866
1930
|
/***/ (function(module, exports) {
|
1867
1931
|
|
1868
1932
|
// File ignored in coverage tests via setting in .istanbul.yml
|
@@ -2603,7 +2667,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
2603
2667
|
module.exports = exports["default"];
|
2604
2668
|
|
2605
2669
|
/***/ }),
|
2606
|
-
/*
|
2670
|
+
/* 48 */
|
2607
2671
|
/***/ (function(module, exports, __webpack_require__) {
|
2608
2672
|
|
2609
2673
|
'use strict';
|
@@ -2612,7 +2676,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
2612
2676
|
|
2613
2677
|
exports.__esModule = true;
|
2614
2678
|
|
2615
|
-
var _visitor = __webpack_require__(
|
2679
|
+
var _visitor = __webpack_require__(49);
|
2616
2680
|
|
2617
2681
|
var _visitor2 = _interopRequireDefault(_visitor);
|
2618
2682
|
|
@@ -2827,7 +2891,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
2827
2891
|
module.exports = exports['default'];
|
2828
2892
|
|
2829
2893
|
/***/ }),
|
2830
|
-
/*
|
2894
|
+
/* 49 */
|
2831
2895
|
/***/ (function(module, exports, __webpack_require__) {
|
2832
2896
|
|
2833
2897
|
'use strict';
|
@@ -2970,7 +3034,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
2970
3034
|
module.exports = exports['default'];
|
2971
3035
|
|
2972
3036
|
/***/ }),
|
2973
|
-
/*
|
3037
|
+
/* 50 */
|
2974
3038
|
/***/ (function(module, exports, __webpack_require__) {
|
2975
3039
|
|
2976
3040
|
'use strict';
|
@@ -3201,7 +3265,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
3201
3265
|
}
|
3202
3266
|
|
3203
3267
|
/***/ }),
|
3204
|
-
/*
|
3268
|
+
/* 51 */
|
3205
3269
|
/***/ (function(module, exports, __webpack_require__) {
|
3206
3270
|
|
3207
3271
|
/* eslint-disable new-cap */
|
@@ -3223,7 +3287,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
3223
3287
|
|
3224
3288
|
var _utils = __webpack_require__(5);
|
3225
3289
|
|
3226
|
-
var _ast = __webpack_require__(
|
3290
|
+
var _ast = __webpack_require__(45);
|
3227
3291
|
|
3228
3292
|
var _ast2 = _interopRequireDefault(_ast);
|
3229
3293
|
|
@@ -3772,7 +3836,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
3772
3836
|
}
|
3773
3837
|
|
3774
3838
|
/***/ }),
|
3775
|
-
/*
|
3839
|
+
/* 52 */
|
3776
3840
|
/***/ (function(module, exports, __webpack_require__) {
|
3777
3841
|
|
3778
3842
|
'use strict';
|
@@ -3791,7 +3855,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
3791
3855
|
|
3792
3856
|
var _utils = __webpack_require__(5);
|
3793
3857
|
|
3794
|
-
var _codeGen = __webpack_require__(
|
3858
|
+
var _codeGen = __webpack_require__(53);
|
3795
3859
|
|
3796
3860
|
var _codeGen2 = _interopRequireDefault(_codeGen);
|
3797
3861
|
|
@@ -4936,7 +5000,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
4936
5000
|
module.exports = exports['default'];
|
4937
5001
|
|
4938
5002
|
/***/ }),
|
4939
|
-
/*
|
5003
|
+
/* 53 */
|
4940
5004
|
/***/ (function(module, exports, __webpack_require__) {
|
4941
5005
|
|
4942
5006
|
/* global define */
|
data/handlebars.runtime.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/**!
|
2
2
|
|
3
3
|
@license
|
4
|
-
handlebars v4.
|
4
|
+
handlebars v4.7.0
|
5
5
|
|
6
6
|
Copyright (C) 2011-2019 by Yehuda Katz
|
7
7
|
|
@@ -111,7 +111,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
111
111
|
|
112
112
|
var runtime = _interopRequireWildcard(_handlebarsRuntime);
|
113
113
|
|
114
|
-
var _handlebarsNoConflict = __webpack_require__(
|
114
|
+
var _handlebarsNoConflict = __webpack_require__(43);
|
115
115
|
|
116
116
|
var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict);
|
117
117
|
|
@@ -207,7 +207,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
207
207
|
|
208
208
|
var _logger2 = _interopRequireDefault(_logger);
|
209
209
|
|
210
|
-
var VERSION = '4.
|
210
|
+
var VERSION = '4.7.0';
|
211
211
|
exports.VERSION = VERSION;
|
212
212
|
var COMPILER_REVISION = 8;
|
213
213
|
exports.COMPILER_REVISION = COMPILER_REVISION;
|
@@ -1240,7 +1240,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1240
1240
|
|
1241
1241
|
var _internalWrapHelper = __webpack_require__(38);
|
1242
1242
|
|
1243
|
-
var
|
1243
|
+
var _internalProtoAccess = __webpack_require__(39);
|
1244
1244
|
|
1245
1245
|
function checkRevision(compilerInfo) {
|
1246
1246
|
var compilerRevision = compilerInfo && compilerInfo[0] || 1,
|
@@ -1289,8 +1289,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1289
1289
|
|
1290
1290
|
var extendedOptions = Utils.extend({}, options, {
|
1291
1291
|
hooks: this.hooks,
|
1292
|
-
|
1293
|
-
allowedProtoProperties: this.allowedProtoProperties
|
1292
|
+
protoAccessControl: this.protoAccessControl
|
1294
1293
|
});
|
1295
1294
|
|
1296
1295
|
var result = env.VM.invokePartial.call(this, partial, context, extendedOptions);
|
@@ -1329,12 +1328,14 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1329
1328
|
},
|
1330
1329
|
lookupProperty: function lookupProperty(parent, propertyName) {
|
1331
1330
|
var result = parent[propertyName];
|
1331
|
+
if (result == null) {
|
1332
|
+
return result;
|
1333
|
+
}
|
1332
1334
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
1333
1335
|
return result;
|
1334
1336
|
}
|
1335
|
-
var whitelist = typeof result === 'function' ? container.allowedProtoMethods : container.allowedProtoProperties;
|
1336
1337
|
|
1337
|
-
if (
|
1338
|
+
if (_internalProtoAccess.resultIsAllowed(result, container.protoAccessControl, propertyName)) {
|
1338
1339
|
return result;
|
1339
1340
|
}
|
1340
1341
|
return undefined;
|
@@ -1417,9 +1418,11 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1417
1418
|
function main(context /*, options*/) {
|
1418
1419
|
return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths);
|
1419
1420
|
}
|
1421
|
+
|
1420
1422
|
main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams);
|
1421
1423
|
return main(context, options);
|
1422
1424
|
}
|
1425
|
+
|
1423
1426
|
ret.isTop = true;
|
1424
1427
|
|
1425
1428
|
ret._setup = function (options) {
|
@@ -1437,15 +1440,13 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1437
1440
|
}
|
1438
1441
|
|
1439
1442
|
container.hooks = {};
|
1440
|
-
container.
|
1441
|
-
container.allowedProtoMethods = _internalCreateNewLookupObject.createNewLookupObject(options.allowedProtoMethods);
|
1443
|
+
container.protoAccessControl = _internalProtoAccess.createProtoAccessControl(options);
|
1442
1444
|
|
1443
1445
|
var keepHelperInHelpers = options.allowCallsToHelperMissing || templateWasPrecompiledWithCompilerV7;
|
1444
1446
|
_helpers.moveHelperToHooks(container, 'helperMissing', keepHelperInHelpers);
|
1445
1447
|
_helpers.moveHelperToHooks(container, 'blockHelperMissing', keepHelperInHelpers);
|
1446
1448
|
} else {
|
1447
|
-
container.
|
1448
|
-
container.allowedProtoMethods = options.allowedProtoMethods;
|
1449
|
+
container.protoAccessControl = options.protoAccessControl; // internal option
|
1449
1450
|
container.helpers = options.helpers;
|
1450
1451
|
container.partials = options.partials;
|
1451
1452
|
container.decorators = options.decorators;
|
@@ -1640,24 +1641,59 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1640
1641
|
|
1641
1642
|
var _Object$create = __webpack_require__(40)['default'];
|
1642
1643
|
|
1644
|
+
var _interopRequireWildcard = __webpack_require__(1)['default'];
|
1645
|
+
|
1643
1646
|
exports.__esModule = true;
|
1644
|
-
exports.
|
1647
|
+
exports.createProtoAccessControl = createProtoAccessControl;
|
1648
|
+
exports.resultIsAllowed = resultIsAllowed;
|
1645
1649
|
|
1646
|
-
var
|
1650
|
+
var _createNewLookupObject = __webpack_require__(42);
|
1647
1651
|
|
1648
|
-
|
1649
|
-
* Create a new object with "null"-prototype to avoid truthy results on prototype properties.
|
1650
|
-
* The resulting object can be used with "object[property]" to check if a property exists
|
1651
|
-
* @param {...object} sources a varargs parameter of source objects that will be merged
|
1652
|
-
* @returns {object}
|
1653
|
-
*/
|
1652
|
+
var _logger = __webpack_require__(31);
|
1654
1653
|
|
1655
|
-
|
1656
|
-
|
1657
|
-
|
1654
|
+
var logger = _interopRequireWildcard(_logger);
|
1655
|
+
|
1656
|
+
function createProtoAccessControl(runtimeOptions) {
|
1657
|
+
var defaultMethodWhiteList = _Object$create(null);
|
1658
|
+
defaultMethodWhiteList['constructor'] = false;
|
1659
|
+
defaultMethodWhiteList['__defineGetter__'] = false;
|
1660
|
+
defaultMethodWhiteList['__defineSetter__'] = false;
|
1661
|
+
defaultMethodWhiteList['__lookupGetter__'] = false;
|
1662
|
+
|
1663
|
+
var defaultPropertyWhiteList = _Object$create(null);
|
1664
|
+
// eslint-disable-next-line no-proto
|
1665
|
+
defaultPropertyWhiteList['__proto__'] = false;
|
1666
|
+
|
1667
|
+
return {
|
1668
|
+
properties: {
|
1669
|
+
whitelist: _createNewLookupObject.createNewLookupObject(defaultPropertyWhiteList, runtimeOptions.allowedProtoProperties),
|
1670
|
+
defaultValue: runtimeOptions.allowProtoPropertiesByDefault
|
1671
|
+
},
|
1672
|
+
methods: {
|
1673
|
+
whitelist: _createNewLookupObject.createNewLookupObject(defaultMethodWhiteList, runtimeOptions.allowedProtoMethods),
|
1674
|
+
defaultValue: runtimeOptions.allowProtoMethodsByDefault
|
1675
|
+
}
|
1676
|
+
};
|
1677
|
+
}
|
1678
|
+
|
1679
|
+
function resultIsAllowed(result, protoAccessControl, propertyName) {
|
1680
|
+
if (typeof result === 'function') {
|
1681
|
+
return checkWhiteList(protoAccessControl.methods, propertyName);
|
1682
|
+
} else {
|
1683
|
+
return checkWhiteList(protoAccessControl.properties, propertyName);
|
1658
1684
|
}
|
1685
|
+
}
|
1659
1686
|
|
1660
|
-
|
1687
|
+
function checkWhiteList(protoAccessControlForType, propertyName) {
|
1688
|
+
if (protoAccessControlForType.whitelist[propertyName] !== undefined) {
|
1689
|
+
return protoAccessControlForType.whitelist[propertyName] === true;
|
1690
|
+
}
|
1691
|
+
if (protoAccessControlForType.defaultValue !== undefined) {
|
1692
|
+
return protoAccessControlForType.defaultValue;
|
1693
|
+
}
|
1694
|
+
// eslint-disable-next-line no-console
|
1695
|
+
logger.log('error', 'Handlebars: Access has been denied to resolve the property "' + propertyName + '" because it is not an "own property" of its parent.\n' + 'You can add a runtime option to disable the check or this warning:\n' + 'See http://localhost:8080/api-reference/runtime-options.html#options-to-control-prototype-access for details');
|
1696
|
+
return false;
|
1661
1697
|
}
|
1662
1698
|
|
1663
1699
|
/***/ }),
|
@@ -1677,6 +1713,34 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1677
1713
|
|
1678
1714
|
/***/ }),
|
1679
1715
|
/* 42 */
|
1716
|
+
/***/ (function(module, exports, __webpack_require__) {
|
1717
|
+
|
1718
|
+
'use strict';
|
1719
|
+
|
1720
|
+
var _Object$create = __webpack_require__(40)['default'];
|
1721
|
+
|
1722
|
+
exports.__esModule = true;
|
1723
|
+
exports.createNewLookupObject = createNewLookupObject;
|
1724
|
+
|
1725
|
+
var _utils = __webpack_require__(4);
|
1726
|
+
|
1727
|
+
/**
|
1728
|
+
* Create a new object with "null"-prototype to avoid truthy results on prototype properties.
|
1729
|
+
* The resulting object can be used with "object[property]" to check if a property exists
|
1730
|
+
* @param {...object} sources a varargs parameter of source objects that will be merged
|
1731
|
+
* @returns {object}
|
1732
|
+
*/
|
1733
|
+
|
1734
|
+
function createNewLookupObject() {
|
1735
|
+
for (var _len = arguments.length, sources = Array(_len), _key = 0; _key < _len; _key++) {
|
1736
|
+
sources[_key] = arguments[_key];
|
1737
|
+
}
|
1738
|
+
|
1739
|
+
return _utils.extend.apply(undefined, [_Object$create(null)].concat(sources));
|
1740
|
+
}
|
1741
|
+
|
1742
|
+
/***/ }),
|
1743
|
+
/* 43 */
|
1680
1744
|
/***/ (function(module, exports) {
|
1681
1745
|
|
1682
1746
|
/* WEBPACK VAR INJECTION */(function(global) {'use strict';
|
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: 4.
|
4
|
+
version: 4.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yehuda Katz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Handlebars.js source code wrapper for (pre)compilation gems.
|
14
14
|
email:
|