3 ms·
> Our program, however, is still susceptible to potential misbehaving. Let’s say our user decides to call his blog post "hasOwnProperty". This will virtually n
by breck 14y ago
> Our program, however, is still susceptible to potential misbehaving. Let’s say our user decides to call his blog post "hasOwnProperty".
This will virtually never happen. If you're worried about it, put an early return (if (name === 'hasOwnProperty') return). End of story.
- mtts 14y agoDownvoted because "this will virtually never happen" is, uhm, for want of a better term, incredibly stupid. Allow what you want to allow and disallow everything else.
- breck 14y agoSorry, this will happen 00.0001% of the time. Orders of magnitude less than dozens of other more pressing problems.
- Groxx 14y agoUnless you run a blogging platform which is used by JS programmers.