From 0b593bfe5d123d7a29d1ad40093162027460f0db Mon Sep 17 00:00:00 2001
From: Nils Knappmeier <github@knappi.org>
Date: Tue, 8 Oct 2019 22:19:01 +0200
Subject: [PATCH 1/4] chore: link to s3 bucket with https, add "npm ci" to
 build instructions

---
 CONTRIBUTING.md | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index a73a6b34b..5dc1c9fb5 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -90,6 +90,7 @@ Handlebars utilizes the [release yeoman generator][generator-release] to perform
 A full release may be completed with the following:
 
 ```
+npm ci
 yo release
 npm publish
 yo release:publish components handlebars.js dist/components/
@@ -104,7 +105,7 @@ in those places still point to the latest version
 
 * [The npm-package](https://www.npmjs.com/package/handlebars) (check latest-tag)
 * [The bower package](https://github.com/components/handlebars.js) (check the package.json)
-* [The AWS S3 Bucket](http://builds.handlebarsjs.com.s3.amazonaws.com/) (check latest-tag)
+* [The AWS S3 Bucket](https://s3.amazonaws.com/builds.handlebarsjs.com) (check latest-tag)
 * [RubyGems](https://rubygems.org/gems/handlebars-source)
 
 When everything is OK, the handlebars site needs to be updated to point to the new version numbers. The jsfiddle link should be updated to point to the most recent distribution for all instances in our documentation.

From f1752fe66f1c4047fbb242af4652b9c026ec6562 Mon Sep 17 00:00:00 2001
From: Nils Knappmeier <npm@knappi.org>
Date: Sun, 20 Oct 2019 21:23:02 +0200
Subject: [PATCH 2/4] fix: prevent zero length tokens in raw-blocks (#1577)

This comment ensures that the lexer is not stuck on zero-length tokens, in raw-blocks like {{{{a}}}} {{{{/a}}}}
---
 spec/helpers.js   | 35 ++++++++++++++++++++++++++++-------
 src/handlebars.l  |  2 +-
 src/handlebars.yy |  2 +-
 3 files changed, 30 insertions(+), 9 deletions(-)

diff --git a/spec/helpers.js b/spec/helpers.js
index 15bc2f121..0e756aba3 100644
--- a/spec/helpers.js
+++ b/spec/helpers.js
@@ -28,14 +28,35 @@ describe('helpers', function() {
                     'raw block helper gets raw content');
   });
 
-  it('helper for nested raw block gets raw content', function() {
-    var string = '{{{{a}}}} {{{{b}}}} {{{{/b}}}} {{{{/a}}}}';
-    var helpers = {
-        a: function(options) {
+  describe('raw block parsing (with identity helper-function)', function() {
+
+    function runWithIdentityHelper(template, expected) {
+      var helpers = {
+        identity: function(options) {
           return options.fn();
-      }
-    };
-    shouldCompileTo(string, [{}, helpers], ' {{{{b}}}} {{{{/b}}}} ', 'raw block helper should get nested raw block as raw content');
+        }
+      };
+      shouldCompileTo(template, [{}, helpers], expected);
+    }
+
+    it('helper for nested raw block gets raw content', function() {
+      runWithIdentityHelper('{{{{identity}}}} {{{{b}}}} {{{{/b}}}} {{{{/identity}}}}', ' {{{{b}}}} {{{{/b}}}} ');
+    });
+
+    it('helper for nested raw block works with empty content', function() {
+      runWithIdentityHelper('{{{{identity}}}}{{{{/identity}}}}', '');
+    });
+
+    it('helper for nested raw block works if nested raw blocks are broken', function() {
+      runWithIdentityHelper('{{{{identity}}}} {{{{a}}}} {{{{ {{{{/ }}}} }}}} {{{{/identity}}}}', ' {{{{a}}}} {{{{ {{{{/ }}}} }}}} ');
+    });
+
+    it('helper for nested raw block throw exception when with missing closing braces', function() {
+      var string = '{{{{a}}}} {{{{/a';
+      shouldThrow(function() {
+        Handlebars.compile(string)();
+      });
+    });
   });
 
   it('helper block with identical context', function() {
diff --git a/src/handlebars.l b/src/handlebars.l
index 90acffec0..2b27a9fab 100644
--- a/src/handlebars.l
+++ b/src/handlebars.l
@@ -63,7 +63,7 @@ ID    [^\s!"#%-,\.\/;->@\[-\^`\{-~]+/{LOOKAHEAD}
                                     return 'END_RAW_BLOCK';
                                   }
                                  }
-<raw>[^\x00]*?/("{{{{")          { return 'CONTENT'; }
+<raw>[^\x00]+/("{{{{")          { return 'CONTENT'; }
 
 <com>[\s\S]*?"--"{RIGHT_STRIP}?"}}" {
   this.popState();
diff --git a/src/handlebars.yy b/src/handlebars.yy
index ce0649838..cab04c61a 100644
--- a/src/handlebars.yy
+++ b/src/handlebars.yy
@@ -39,7 +39,7 @@ content
   };
 
 rawBlock
-  : openRawBlock content+ END_RAW_BLOCK -> yy.prepareRawBlock($1, $2, $3, @$)
+  : openRawBlock content* END_RAW_BLOCK -> yy.prepareRawBlock($1, $2, $3, @$)
   ;
 
 openRawBlock

From 143ac806dadd3314ef4390234fb66232413ac3ae Mon Sep 17 00:00:00 2001
From: Nils Knappmeier <github@knappi.org>
Date: Sun, 20 Oct 2019 21:32:09 +0200
Subject: [PATCH 3/4] Update release notes

---
 release-notes.md | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/release-notes.md b/release-notes.md
index c20a86cbc..eb60913a5 100644
--- a/release-notes.md
+++ b/release-notes.md
@@ -2,7 +2,19 @@
 
 ## Development
 
-[Commits](https://github.com/wycats/handlebars.js/compare/v4.4.3...master)
+[Commits](https://github.com/wycats/handlebars.js/compare/v4.4.4...master)
+
+## v4.4.4 - October 20th, 2019
+Bugfixes:
+- fix: prevent zero length tokens in raw-blocks (#1577, #1578) - f1752fe
+
+Chore: 
+- chore: link to s3 bucket with https, add "npm ci" to build instructions - 0b593bf
+
+Compatibility notes:
+- no compatibility issues are expected
+
+[Commits](https://github.com/wycats/handlebars.js/compare/v4.4.3...v4.4.4)
 
 ## v4.4.3 - October 8th, 2019
 Bugfixes

From 2ab261eab7835e9c80ad1cb7ef9fc9b0f46d6a57 Mon Sep 17 00:00:00 2001
From: Nils Knappmeier <github@knappi.org>
Date: Sun, 20 Oct 2019 21:33:00 +0200
Subject: [PATCH 4/4] v4.4.4

---
 components/bower.json           | 2 +-
 components/handlebars.js.nuspec | 2 +-
 components/package.json         | 2 +-
 lib/handlebars/base.js          | 2 +-
 package.json                    | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/components/bower.json b/components/bower.json
index ea6ba5fb8..fc7a33709 100644
--- a/components/bower.json
+++ b/components/bower.json
@@ -1,6 +1,6 @@
 {
   "name": "handlebars",
-  "version": "4.4.3",
+  "version": "4.4.4",
   "main": "handlebars.js",
   "license": "MIT",
   "dependencies": {}
diff --git a/components/handlebars.js.nuspec b/components/handlebars.js.nuspec
index 1c69e0abb..653078c14 100644
--- a/components/handlebars.js.nuspec
+++ b/components/handlebars.js.nuspec
@@ -2,7 +2,7 @@
 <package>
 	<metadata>
 		<id>handlebars.js</id>
-		<version>4.4.3</version>
+		<version>4.4.4</version>
 		<authors>handlebars.js Authors</authors>
 		<licenseUrl>https://github.com/wycats/handlebars.js/blob/master/LICENSE</licenseUrl>
 		<projectUrl>https://github.com/wycats/handlebars.js/</projectUrl>
diff --git a/components/package.json b/components/package.json
index 0b116e797..e8e6f1cba 100644
--- a/components/package.json
+++ b/components/package.json
@@ -1,6 +1,6 @@
 {
   "name": "handlebars",
-  "version": "4.4.3",
+  "version": "4.4.4",
   "license": "MIT",
   "jspm": {
     "main": "handlebars",
diff --git a/lib/handlebars/base.js b/lib/handlebars/base.js
index 7d649de09..2b7709200 100644
--- a/lib/handlebars/base.js
+++ b/lib/handlebars/base.js
@@ -4,7 +4,7 @@ import {registerDefaultHelpers} from './helpers';
 import {registerDefaultDecorators} from './decorators';
 import logger from './logger';
 
-export const VERSION = '4.4.3';
+export const VERSION = '4.4.4';
 export const COMPILER_REVISION = 8;
 export const LAST_COMPATIBLE_COMPILER_REVISION = 7;
 
diff --git a/package.json b/package.json
index 54daa5c9a..de7e3da01 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
 {
   "name": "handlebars",
   "barename": "handlebars",
-  "version": "4.4.3",
+  "version": "4.4.4",
   "description": "Handlebars provides the power necessary to let you build semantic templates effectively with no frustration",
   "homepage": "http://www.handlebarsjs.com/",
   "keywords": [
