Skip to content

Commit

Permalink
Patched issue #8 - _restrict now deny external calls from accessing t…
Browse files Browse the repository at this point in the history
…he parent state of restricted descendants
  • Loading branch information
bemson committed May 1, 2011
1 parent 7104719 commit 4648844
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/flow.js
@@ -1,5 +1,5 @@
/*
* Flow v0.2.2
* Flow v0.2.2.1
* http://github.com/bemson/Flow/
*
* Copyright 2011, Bemi Faison
Expand Down Expand Up @@ -1028,7 +1028,7 @@
sys.objects.Node.prototype = {
allowTgt: function (tgt) {
var node = this;
return node.flow.exec || !node.restrict || !tgt.path.indexOf(node.restrict);
return node.flow.exec || !node.restrict || (tgt.path.length > node.restrict.length && !tgt.path.indexOf(node.restrict));
},
// add single variable - supports cfg can be a string or object
addVarDef: function (cfg) {
Expand Down

0 comments on commit 4648844

Please sign in to comment.