Downvoted 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.
Sorry, this will happen 00.0001% of the time. Orders of magnitude less than dozens of other more pressing problems.
downvoted for assuming that "chance of happening in random usage" has any correlation to what a determinated user will actually try to do.
This is like saying "oh, but nobody will ever insert SQL in our forms!"
good point.
This will virtually never happen. If you're worried about it, put an early return (if (name === 'hasOwnProperty') return). End of story.