Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
fix TypeError if path /constructor/foo is accessed #16
If there are any literals available in the router, then any access to a path with
This fixes these TypeErrors by checking whether the property is the literal list's own.
There is a similar code path for the
If there are any literals available in the router, then any access to a path with multiple segments and its first segment an object prototype property lead to a TypeError. This fixes these TypeErrors by checking whether the property is the literal list's own. There is a similar code path for the `this._fulls` but the path always contains a leading slash, thus is not vulnerable to such error. ``` Debug: internal, implementation, error TypeError: match.lookup is not a function at Object.internals.deeper (/some-project/node_modules/hapi/node_modules/call/lib/segment.js:240:28) at internals.Segment.lookup (/some-project/node_modules/hapi/node_modules/call/lib/segment.js:177:36) at internals.Router._lookup (/some-project/node_modules/hapi/node_modules/call/lib/index.js:113:28) at internals.Router.route (/some-project/node_modules/hapi/node_modules/call/lib/index.js:94:22) at internals.Request._lifecycle (/some-project/node_modules/hapi/lib/request.js:343:41) at internals.Request._execute (/some-project/node_modules/hapi/lib/request.js:312:21) at Domain.<anonymous> (/some-project/node_modules/hapi/lib/connection.js:253:25) at Domain.run (domain.js:191:14) at internals.Protect.enter (/some-project/node_modules/hapi/lib/protect.js:84:17) at Server.internals.Connection._dispatch (/some-project/node_modules/hapi/lib/connection.js:251:30) ```