From b47f505588f37077153d5e0eb41397bb571b801c Mon Sep 17 00:00:00 2001 From: Jermolene Date: Fri, 5 Feb 2016 17:39:02 +0000 Subject: [PATCH] Freeze the entire tiddler object As seen in the first pass of #2247, it was previously inadvertently possible for callers to modify the tiddler object itself by adding and replacing properties. --- boot/boot.js | 1 + 1 file changed, 1 insertion(+) diff --git a/boot/boot.js b/boot/boot.js index 62b85cffc..1a41b4d07 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -812,6 +812,7 @@ $tw.Tiddler = function(/* [fields,] fields */) { } // Freeze the tiddler against modification Object.freeze(this.fields); + Object.freeze(this); }; $tw.Tiddler.prototype.hasField = function(field) {