visionmedia/express — Issue #1033: Object prototype compatibility...
Author: MarcusPope
Created: 2012-03-01 20:41:27+00:00
State: open

Would you mind wrapping the for..in loop with a hasOwnProperty check on line 395 of lib\view.js?

for (var key in dynamicHelpers) {
if (dynamicHelpers.hasOwnProperty(key)) {
this.__dynamicHelpers[key] = dynamicHelpers[key].call(
this.app
, this.req
, this);
}
}

If a library or application extends the object prototype the above code will protect from invalid key references.

Thanks!
-Marcus