2020-05-21

Meteor - List all templates using three bracket kind of outputs

On the client console:

Object.keys(Template).filter(function(key){
  return(
    Template[key] &&
    Template[key].renderFunction && 
    Template[key]
        .renderFunction
        .toString()
        .indexOf('Spacebars.makeRaw') > -1
    );
});


Credits: 
Pete Corey http://www.petecorey.com/blog/2015/04/03/black-box-meteor-triple-brace-xss/

No comments:

Post a Comment