diff --git a/HISTORY.md b/HISTORY.md index 91b7266..e7ff536 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,34 +1,56 @@ -unreleased -================== +5.0.0 +===== - * deps: handlebars@4.7.8 - - Make library compatible with workers - - Don't rely on Node.js global object - - Fix compiling of each block params in strict mode - - Fix rollup warning when importing Handlebars as ESM - - Fix bundler issue with webpack 5 - - Use https instead of git for mustache submodule +- BREAKING: prototype-access is now disabled by default. hbs no longer sets `allowProtoMethodsByDefault` and `allowProtoPropertiesByDefault` to `true`, so handlebars' defaults apply: templates no longer read inherited (prototype) members of the data, and handlebars logs a warning the first time a lookup of a given property is blocked. Opt back in per instance via `runtimeOptions`. +- BREAKING: require Node.js >= 18 +- BREAKING: target Express 5 and remove the legacy Express 2.x `compile()` engine method +- BREAKING: remove the deprecated `hbs.SafeString` and `hbs.Utils` aliases. Use `hbs.handlebars.SafeString` and `hbs.handlebars.Utils` instead. +- BREAKING: async helper callbacks called with two arguments are now error-first (`cb(err, result)`), so a truthy first argument fails the render. Callbacks called with a single argument (`cb(result)`) are unchanged. -4.2.0 / 2021-11-16 -================== +4.4.0 +===== + +- deps: handlebars@4.7.10 ([#283](https://github.com/pillarjs/hbs/pull/283)) + - addresses [CVE-2026-106445](https://www.cve.org/CVERecord?id=CVE-2026-106445) ([GHSA-p8wg-vrv2-v86f](https://github.com/advisories/GHSA-p8wg-vrv2-v86f)), [GHSA-8r5x-fm3f-whwj](https://github.com/advisories/GHSA-8r5x-fm3f-whwj), and [GHSA-xw65-4hp5-5hc7](https://github.com/advisories/GHSA-xw65-4hp5-5hc7) +- Add `compileOptions` instance option forwarded to `handlebars.compile()` ([#268](https://github.com/pillarjs/hbs/pull/268)) +- Add `runtimeOptions` instance option forwarded to the compiled template at render time. This can restore handlebars' safer prototype-access defaults by setting `allowProtoMethodsByDefault` and `allowProtoPropertiesByDefault` to `false` ([#284](https://github.com/pillarjs/hbs/pull/284)) + +4.3.1 +===== + +- Fix [CVE-2026-87123](https://www.cve.org/CVERecord?id=CVE-2026-87123) ([GHSA-3c55-w9jx-p5jr](https://github.com/pillarjs/hbs/security/advisories/GHSA-3c55-w9jx-p5jr)) +- fix treat async substitution throws as render errors + +4.3.0 +===== + +- Fix [CVE-2026-16231](https://www.cve.org/CVERecord?id=CVE-2026-16231) ([GHSA-rg36-rxv9-2m9q](https://github.com/pillarjs/hbs/security/advisories/GHSA-rg36-rxv9-2m9q)) + +4.2.1 +===== + + * deps: handlebars@4.7.9 + +4.2.0 +===== * Add `rename` option to `registerPartials` * Ensure all partials are registered before rendering * Fix function context in async helpers * deps: walk@2.3.15 -4.1.2 / 2021-04-15 -================== +4.1.2 +===== * deps: handlebars@4.7.7 -4.1.1 / 2020-04-03 -================== +4.1.1 +===== * deps: handlebars@4.7.6 -4.1.0 / 2020-01-14 -================== +4.1.0 +===== * deps: handlebars@4.5.3 - Add `handlebars.parseWithoutProcessing` @@ -39,15 +61,15 @@ unreleased - Fix work-around for `constructor` blocking - Validate arguments to `#if`, `#unless` and `#with` helpers -4.0.6 / 2019-10-09 -================== +4.0.6 +===== * deps: handlebars@4.3.5 - Fix error object inheritance - Fix work-around for `constructor` blocking -4.0.5 / 2019-09-27 -================== +4.0.5 +===== * Fix async helpers not working when cache enabled * Fix handling of exceptions from layout @@ -57,115 +79,115 @@ unreleased - Fix work-around for `constructor` blocking * deps: walk@2.3.14 -4.0.4 / 2019-04-14 -================== +4.0.4 +===== * deps: handlebars@4.0.14 - Block `constructor` property using `lookup` -4.0.3 / 2019-03-01 -================== +4.0.3 +===== * Fix path for partials multiple dirs deep on Windows -4.0.2 / 2019-02-18 -================== +4.0.2 +===== * deps: handlebars@4.0.13 -4.0.1 / 2016-09-18 -================== +4.0.1 +===== * Support params for async helper * deps: handlebars@4.0.5 * deps: walk@2.3.9 -4.0.0 / 2015-11-02 -================== +4.0.0 +===== * Fix caching of non default filename layouts * deps: handlebars@4.0.3 -3.1.1 / 2015-09-11 -================== +3.1.1 +===== * Fix `localsAsTemplateData` when cache is enabled -3.1.0 / 2015-06-10 -================== +3.1.0 +===== * Make `@data` available to layouts -3.0.1 / 2015-03-12 -================== +3.0.1 +===== * Fix using custom extensions when using view engine layouts -3.0.0 / 2015-03-09 -================== +3.0.0 +===== * deps: handlebars@3.0.0 -2.9.0 / 2015-03-06 -================== +2.9.0 +===== * Scope internal async tracker to per middleware * Support multiple view folders from Express -2.8.0 / 2014-12-26 -================== +2.8.0 +===== * Scope internal async tracker to per hbs instance * deps: handlebars@2.0.0 -2.7.0 / 2014-06-02 -================== +2.7.0 +===== * Fix registering directories of partials on Windows * Add API to expose locals as template data -2.6.0 / 2014-04-06 -================== +2.6.0 +===== * Fix support for custom handlebars instance -2.5.0 / 2014-02-19 -================== +2.5.0 +===== * deps: handlebars@1.3.0 -2.4.0 / 2013-09-13 -================== +2.4.0 +===== * Add support for multi-level partial paths -2.3.1 / 2013-08-01 -================== +2.3.1 +===== * deps: after@0.8.1 * deps: handlebars@1.0.12 -2.3.0 / 2013-05-30 -================== +2.3.0 +===== * Add `registerPartials` -2.1.0 / 2013-03-19 -================== +2.1.0 +===== * Add `create` for multiple instances -2.0.2 / 2013-02-21 -================== +2.0.2 +===== * deps: handlebars@1.0.9 -2.0.1 / 2012-11-30 -================== +2.0.1 +===== * Ignore layout error when not using layout -2.0.0 / 2012-11-21 -================== +2.0.0 +===== * deps: handlebars@1.0.7 diff --git a/README.md b/README.md index 0ec2e9e..581e296 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,25 @@ app.set('view engine', 'html') app.engine('html', require('hbs').__express) ``` +## Security ## + +hbs is a thin wrapper around [handlebars](https://handlebarsjs.com/), so its +[prototype-access security options](https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access) +apply. Two points are worth calling out: + +- **Prototype access.** hbs does not set `allowProtoMethodsByDefault` or + `allowProtoPropertiesByDefault`, so handlebars' own defaults apply: inherited + (prototype) members of the data are not readable from templates, and + handlebars logs a warning the first time a lookup of a given property is + blocked. If your templates need to read inherited members, opt in through + [Runtime options](#runtime-options). (hbs 4.x set both to `true`; 5.0 + restores the safer handlebars defaults.) +- **HTML escaping.** `{{expression}}` output is HTML-escaped by default. Do not + enable `noEscape` (see [Compile options](#compile-options)) for untrusted data. + +In all cases, treat both the template and the template context as trusted input: +do not compile templates from, or render untrusted data through, untrusted sources. + ## Helpers and Partials ## hbs exposes the `registerHelper` and `registerPartial` method from handlebars. @@ -117,6 +136,79 @@ If you wish to use handlebars methods like `SafeString` please do so on this pro hbs.handlebars === require('handlebars'); ``` +## Compile options ## + +Options for [`handlebars.compile()`](https://handlebarsjs.com/api-reference/compilation.html) +(such as `strict`, `noEscape` or `preventIndent`) can be set per instance. They apply to +every view and layout compiled by that instance. + +```js +const hbs = require('hbs') + +const instance = hbs.create(null, { + compileOptions: { strict: true }, +}) + +app.engine('hbs', instance.__express) +``` + +Note that `noEscape: true` disables HTML escaping for every `{{expression}}` rendered by the +instance, so only use it when the data is trusted. + +The options are also exposed as the `compileOptions` property, which can be changed at any +time (compiled templates already in the cache are not affected): + +```js +hbs.compileOptions = { noEscape: true } +``` + +## Runtime options ## + +[Runtime options](https://handlebarsjs.com/api-reference/runtime-options.html) passed to the +compiled template at render time can be set per instance. The most relevant ones are the +prototype-access controls. + +hbs sets none of them itself, so handlebars' safe prototype-access defaults apply: inherited +(prototype) properties and methods of the data are blocked, and handlebars logs a warning to +the console the first time a lookup of a given property is blocked. Setting +`allowProtoMethodsByDefault` or `allowProtoPropertiesByDefault` to any value, including +`false`, disables that warning. + +If your templates need to read inherited members, opt in per instance: + +```js +const hbs = require('hbs') + +const instance = hbs.create(null, { + runtimeOptions: { + allowProtoMethodsByDefault: true, + allowProtoPropertiesByDefault: true, + }, +}) + +app.engine('hbs', instance.__express) +``` + +To allow only a few known inherited members instead of re-enabling everything, use +handlebars' `allowedProtoProperties` / `allowedProtoMethods` allowlists: + +```js +hbs.create(null, { + runtimeOptions: { + allowedProtoProperties: { myField: true }, + }, +}) +``` + +As with `compileOptions`, the options are exposed as the `runtimeOptions` property and can be +changed at any time: + +```js +hbs.runtimeOptions = { allowProtoPropertiesByDefault: true } +``` + +Regardless of these options, do not render untrusted data as the template context. + ## Recipes ## ### more than one instance ### diff --git a/lib/hbs.js b/lib/hbs.js index 5d050ce..46471a7 100644 --- a/lib/hbs.js +++ b/lib/hbs.js @@ -4,9 +4,9 @@ const walk = require('walk').walk const async = require('./async') -function Instance (handlebars) { +function Instance (handlebars, options) { if (!(this instanceof Instance)) { - return new Instance(handlebars) + return new Instance(handlebars, options) } // expose handlebars, allows users to use their versions @@ -15,6 +15,15 @@ function Instance (handlebars) { self.handlebars = handlebars || require('handlebars').create() + // options forwarded to `handlebars.compile()` for every view and layout + // see https://handlebarsjs.com/api-reference/compilation.html + self.compileOptions = (options && options.compileOptions) || {} + + // options forwarded to the compiled template at render time (handlebars + // runtime options). These override hbs's defaults. + // see https://handlebarsjs.com/api-reference/runtime-options.html + self.runtimeOptions = (options && options.runtimeOptions) || {} + // cache for compiled templates self.cache = {} @@ -47,11 +56,17 @@ function middleware (filename, options, cb) { // if we need a layout, we will look for one matching out extension const extension = path.extname(filename) - // Default handlebars runtime options - const handlebarsOpts = { - allowProtoMethodsByDefault: true, - allowProtoPropertiesByDefault: true, - } + // Handlebars runtime options. hbs sets none of its own, so handlebars' + // defaults apply: inherited (prototype) members are blocked and the first + // blocked lookup of each property logs a warning. Override per instance via + // `runtimeOptions`, e.g. set allowProtoMethodsByDefault/ + // allowProtoPropertiesByDefault to true to allow inherited members, or to + // false to block them without the warning. + // + // The object has a null prototype because handlebars reads these options + // with plain property lookups. Unset options then read as `undefined` + // instead of being inherited from a (possibly polluted) Object.prototype. + const handlebarsOpts = { __proto__: null, ...self.runtimeOptions } // If passing the locals as data, create the handlebars options object now if (self.__localsAsData) { @@ -114,7 +129,7 @@ function middleware (filename, options, cb) { return cb(err) } - const template = handlebars.compile(str) + const template = handlebars.compile(str, self.compileOptions) if (locals.cache) { cache[filename] = template } @@ -214,7 +229,7 @@ function middleware (filename, options, cb) { } function cacheAndCompile (filename, str) { - const layoutTemplate = handlebars.compile(str) + const layoutTemplate = handlebars.compile(str, self.compileOptions) if (options.cache) { cache[filename] = layoutTemplate } @@ -358,6 +373,6 @@ Instance.prototype.localsAsTemplateData = function (app) { } module.exports = new Instance() -module.exports.create = function (handlebars) { - return new Instance(handlebars) +module.exports.create = function (handlebars, options) { + return new Instance(handlebars, options) } diff --git a/package.json b/package.json index 92eac85..ad7dd6e 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "repository": "pillarjs/hbs", "main": "lib/hbs.js", "dependencies": { - "handlebars": "4.7.8", + "handlebars": "4.7.10", "walk": "2.3.15" }, "devDependencies": { diff --git a/test/app.test.js b/test/app.test.js index d8403c4..31c817b 100644 --- a/test/app.test.js +++ b/test/app.test.js @@ -323,12 +323,14 @@ describe('express 4.x', () => { await request(app).get('/locals-cached').expect(expected) }) - it('response locals model', async () => { - const expected = fs.readFileSync( - path.join(FIXTURES_DIR, 'locals.html'), - 'utf8' - ) - await request(app).get('/locals-model').expect(expected) + // Prototype method access (Person.prototype.name) is blocked by the + // secure defaults, so the inherited kid names resolve to empty. Apps that + // need prototype access can opt back in via the `runtimeOptions` instance + // option (see test/runtime_options.test.js). + it('response locals model blocks prototype method access by default', async () => { + await request(app) + .get('/locals-model') + .expect('Alan has a kid named .\nAlan has a kid named .\n') }) it('response globals', async () => { diff --git a/test/async_helper_escape.test.js b/test/async_helper_escape.test.js new file mode 100644 index 0000000..58dd7c3 --- /dev/null +++ b/test/async_helper_escape.test.js @@ -0,0 +1,80 @@ +const path = require('node:path') +const request = require('supertest') +const express = require('express') +const hbsFactory = require('../') + +// Regression test for GHSA-3c55-w9jx-p5jr / CVE-2026-87123. +// +// The DoS was that handlebars' escapeExpression had a SafeString fast path +// which called `value.toHTML()` for any value with a *truthy* `toHTML`, without +// checking that it was callable. An async helper resolving on a later tick to +// an object with a truthy non-callable `toHTML` (trivially produced by +// JSON.parse, since JSON cannot carry functions) made escapeExpression throw a +// TypeError, and on hbs 4.3.0 that throw ran outside the render try/catch and +// crashed the process. +// +// Two layers now prevent this: +// 1. handlebars 4.7.10 fixed the root cause: escapeExpression now checks +// `typeof value.toHTML === 'function'`, so a JSON-sourced `toHTML` key is +// escaped like any other object instead of being invoked. +// 2. The promise-based async pipeline routes any substitution throw through +// processAsyncResults' .catch to the render callback, so it surfaces as a +// normal render error (HTTP 500) the application can handle, never a crash. +describe('async helper output escaping (GHSA-3c55-w9jx-p5jr)', () => { + let app + + before(() => { + const hbs = hbsFactory.create() + + app = express() + app.engine('hbs', hbs.__express) + app.set('view engine', 'hbs') + app.set('views', path.join(__dirname, 'views')) + + // the exact advisory payload: a truthy non-callable `toHTML`, as produced + // by JSON.parse('{"toHTML":"x"}') from untrusted input, resolved on a later + // tick (the normal registerAsyncHelper case) + hbs.registerAsyncHelper('async-tohtml', function (context, cb) { + process.nextTick(function () { + cb(JSON.parse('{"toHTML":"x"}')) + }) + }) + + // a callable `toHTML` that throws, to exercise the pipeline's .catch safety + // net directly (independent of the handlebars 4.7.10 fix) + hbs.registerAsyncHelper('async-throwing', function (context, cb) { + process.nextTick(function () { + cb({ toHTML: function () { throw new Error('boom') } }) + }) + }) + + app.get('/async-tohtml', function (req, res) { + res.render('async-tohtml', { layout: false }) + }) + + app.get('/async-throwing', function (req, res) { + res.render('async-throwing', { layout: false }) + }) + + app.use((err, req, res, next) => { + res.status(500).send(err.message) + }) + }) + + // handlebars 4.7.10 escapes the JSON-sourced `toHTML` key as a plain object + // instead of invoking it, so the advisory payload renders safely and the + // process does not crash + it('a non-callable toHTML async value renders safely without crashing', async () => { + await request(app) + .get('/async-tohtml') + .expect(200, '[object Object]\n') + }) + + // even if escaping throws during async substitution, the promise .catch turns + // it into a handled render error rather than an uncaught exception + it('a throw during async substitution becomes a handled render error', async () => { + await request(app) + .get('/async-throwing') + .expect(500, /boom/) + }) +}) diff --git a/test/compile_options.test.js b/test/compile_options.test.js new file mode 100644 index 0000000..a447ac8 --- /dev/null +++ b/test/compile_options.test.js @@ -0,0 +1,75 @@ +const path = require('node:path') +const assert = require('node:assert') +const request = require('supertest') +const express = require('express') +const hbsFactory = require('../') + +function createApp (instance) { + const app = express() + + app.engine('hbs', instance.__express) + app.set('view engine', 'hbs') + app.set('views', path.join(__dirname, 'views')) + + app.get('/no-escape', (req, res) => { + res.render('no_escape', { layout: false, content: 'bold' }) + }) + + app.get('/strict/present', (req, res) => { + res.render('strict', { layout: false, value: 'ok' }) + }) + + app.get('/strict/missing', (req, res) => { + res.render('strict', { layout: false }) + }) + + app.get('/strict/layout', (req, res) => { + // `title` is only referenced by the layout, so a failure here proves + // the layout was compiled with the same options as the view + res.render('strict', { layout: 'layout', value: 'ok' }) + }) + + app.use((err, req, res, next) => { + res.status(500).send(err.message) + }) + + return app +} + +describe('compile options', () => { + it('compileOptions defaults to an empty object', () => { + assert.deepStrictEqual(hbsFactory.compileOptions, {}) + assert.deepStrictEqual(hbsFactory.create().compileOptions, {}) + assert.deepStrictEqual(hbsFactory.create(null, {}).compileOptions, {}) + }) + + it('compileOptions is taken from create()', () => { + const instance = hbsFactory.create(null, { compileOptions: { strict: true } }) + assert.deepStrictEqual(instance.compileOptions, { strict: true }) + }) + + it('noEscape renders raw html', async () => { + const app = createApp(hbsFactory.create(null, { compileOptions: { noEscape: true } })) + await request(app).get('/no-escape').expect(200, '
bold
\n') + }) + + it('default instance still escapes html', async () => { + const app = createApp(hbsFactory.create()) + await request(app).get('/no-escape').expect(200, '<b>bold</b>
\n') + }) + + it('strict renders when the field is present', async () => { + const app = createApp(hbsFactory.create(null, { compileOptions: { strict: true } })) + await request(app).get('/strict/present').expect(200, 'ok
\n') + }) + + it('strict errors when the field is missing', async () => { + const app = createApp(hbsFactory.create(null, { compileOptions: { strict: true } })) + await request(app).get('/strict/missing').expect(500, /"value" not defined/) + }) + + it('strict applies to layouts too', async () => { + const app = createApp(hbsFactory.create(null, { compileOptions: { strict: true } })) + await request(app).get('/strict/layout').expect(500, /"title" not defined/) + }) +}) diff --git a/test/runtime_options.test.js b/test/runtime_options.test.js new file mode 100644 index 0000000..39cdefa --- /dev/null +++ b/test/runtime_options.test.js @@ -0,0 +1,153 @@ +const path = require('node:path') +const assert = require('node:assert') +const request = require('supertest') +const express = require('express') +const hbsFactory = require('../') + +function createApp (instance) { + const app = express() + + app.engine('hbs', instance.__express) + app.set('view engine', 'hbs') + app.set('views', path.join(__dirname, 'views')) + + app.get('/proto', (req, res) => { + res.render('proto', { + layout: false, + value: Object.create({ inherited: 'PROTO' }), + }) + }) + + // Calls an inherited method, which handlebars gates with the method options + // (allowProtoMethodsByDefault), not the property ones. + app.get('/proto-method', (req, res) => { + res.render('proto-method', { + layout: false, + value: Object.create({ greet () { return 'PROTO' } }), + }) + }) + + // Reads an inherited property whose name comes from the URL. handlebars + // logs its "access denied" warning only once per property name per process, + // so each warning test needs a property name no other test has used. + app.get('/proto-lookup/:key', (req, res) => { + res.render('proto-lookup', { + layout: false, + key: req.params.key, + value: Object.create({ [req.params.key]: 'PROTO' }), + }) + }) + + app.use((err, req, res, next) => { + res.status(500).send(err.message) + }) + + return app +} + +// Run `fn` while collecting everything handlebars writes to console.error. +/* eslint-disable no-console */ +async function captureConsoleErrors (fn) { + const original = console.error + const messages = [] + + console.error = (...args) => { messages.push(args.join(' ')) } + + try { + await fn() + } finally { + console.error = original + } + + return messages +} +/* eslint-enable no-console */ + +describe('runtime options', () => { + it('runtimeOptions defaults to an empty object', () => { + assert.deepStrictEqual(hbsFactory.runtimeOptions, {}) + assert.deepStrictEqual(hbsFactory.create().runtimeOptions, {}) + assert.deepStrictEqual(hbsFactory.create(null, {}).runtimeOptions, {}) + }) + + it('runtimeOptions is taken from create()', () => { + const instance = hbsFactory.create(null, { + runtimeOptions: { allowProtoPropertiesByDefault: true }, + }) + assert.deepStrictEqual(instance.runtimeOptions, { allowProtoPropertiesByDefault: true }) + }) + + // hbs sets no prototype-access options, so handlebars' safe defaults apply + it('prototype property access is blocked by default', async () => { + const app = createApp(hbsFactory.create()) + await request(app).get('/proto').expect(200, '\n') + }) + + it('a blocked lookup logs the handlebars warning by default', async () => { + const app = createApp(hbsFactory.create()) + + const messages = await captureConsoleErrors(async () => { + await request(app).get('/proto-lookup/warnedByDefault').expect(200, '\n') + }) + + assert.strictEqual(messages.length, 1) + assert.match(messages[0], /Access has been denied to resolve the property "warnedByDefault"/) + }) + + it('setting the options to false blocks without the warning', async () => { + const app = createApp(hbsFactory.create(null, { + runtimeOptions: { + allowProtoMethodsByDefault: false, + allowProtoPropertiesByDefault: false, + }, + })) + + const messages = await captureConsoleErrors(async () => { + await request(app).get('/proto-lookup/silencedExplicitly').expect(200, '\n') + }) + + assert.deepStrictEqual(messages, []) + }) + + // handlebars reads its runtime options with plain property lookups, so an + // options object with a regular prototype would pick these up. + it('prototype-access options are not inherited from Object.prototype', async () => { + const app = createApp(hbsFactory.create()) + const polluted = [ + 'allowedProtoProperties', + 'allowProtoPropertiesByDefault', + 'allowProtoMethodsByDefault', + ] + + /* eslint-disable no-extend-native */ + Object.prototype.allowedProtoProperties = { inherited: true } + Object.prototype.allowProtoPropertiesByDefault = true + Object.prototype.allowProtoMethodsByDefault = true + /* eslint-enable no-extend-native */ + + try { + await request(app).get('/proto').expect(200, '\n') + // The method option is only read for methods, so render one too. + // The blocked call logs a handlebars warning, kept out of the output. + await captureConsoleErrors(async () => { + await request(app).get('/proto-method').expect(200, '\n') + }) + } finally { + polluted.forEach((key) => { delete Object.prototype[key] }) + } + }) + + it('runtimeOptions can opt back into prototype property access', async () => { + const app = createApp(hbsFactory.create(null, { + runtimeOptions: { allowProtoPropertiesByDefault: true }, + })) + await request(app).get('/proto').expect(200, 'PROTO
\n') + }) + + it('runtimeOptions can opt back into prototype method access', async () => { + const app = createApp(hbsFactory.create(null, { + runtimeOptions: { allowProtoMethodsByDefault: true }, + })) + await request(app).get('/proto-method').expect(200, 'PROTO
\n') + }) +}) diff --git a/test/views/async-throwing.hbs b/test/views/async-throwing.hbs new file mode 100644 index 0000000..e73b969 --- /dev/null +++ b/test/views/async-throwing.hbs @@ -0,0 +1 @@ +{{async-throwing}} diff --git a/test/views/async-tohtml.hbs b/test/views/async-tohtml.hbs new file mode 100644 index 0000000..6b6225f --- /dev/null +++ b/test/views/async-tohtml.hbs @@ -0,0 +1 @@ +{{async-tohtml}} diff --git a/test/views/no_escape.hbs b/test/views/no_escape.hbs new file mode 100644 index 0000000..d748ca3 --- /dev/null +++ b/test/views/no_escape.hbs @@ -0,0 +1 @@ +{{content}}
diff --git a/test/views/proto-lookup.hbs b/test/views/proto-lookup.hbs new file mode 100644 index 0000000..ce0adfb --- /dev/null +++ b/test/views/proto-lookup.hbs @@ -0,0 +1 @@ +{{lookup value key}}
diff --git a/test/views/proto-method.hbs b/test/views/proto-method.hbs new file mode 100644 index 0000000..9c7516e --- /dev/null +++ b/test/views/proto-method.hbs @@ -0,0 +1 @@ +{{value.greet}}
diff --git a/test/views/proto.hbs b/test/views/proto.hbs new file mode 100644 index 0000000..6f09f29 --- /dev/null +++ b/test/views/proto.hbs @@ -0,0 +1 @@ +{{value.inherited}}
diff --git a/test/views/strict.hbs b/test/views/strict.hbs new file mode 100644 index 0000000..6348549 --- /dev/null +++ b/test/views/strict.hbs @@ -0,0 +1 @@ +{{value}}