From b81b2c0c6336ea0e4e0b99ecb22e8797355d8666 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Tue, 6 Nov 2012 14:10:55 +0000 Subject: [PATCH] Fixed problem with tiddler hashmap handling We need to check hasOwnProperty to avoid problems with tiddlers called eg "__proto__". There are more changes like this to come --- core/modules/wiki.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/wiki.js b/core/modules/wiki.js index afed9834b..ac7c89a7b 100644 --- a/core/modules/wiki.js +++ b/core/modules/wiki.js @@ -216,7 +216,7 @@ exports.getTiddlers = function(sortField,excludeTag) { sortField = sortField || "title"; var tiddlers = [], t, titles = []; for(t in this.tiddlers) { - if(!this.tiddlers[t].isShadow) { + if($tw.utils.hop(this.tiddlers,t) && !this.tiddlers[t].isShadow) { tiddlers.push(this.tiddlers[t]); } }