Skip to content

Perform hasOwnProperty validation  #366

@thisandagain

Description

@thisandagain

From @cwillisf

I would suggest putting something like this at the top of the loop body:

if (!hatInputs.hasOwnProperty(input)) continue;

We're actually missing this sort of check in several places. If you'd like to see the VM explode, try typing something like this into your JS console while the VM is running:

Object.prototype.harmless = false;

I'm of the opinion that we should try to fix this, but I'd be happy to discuss if you disagree. Also, even if you agree that we should fix this sort of thing, since it's an issue in several places I don't feel the need to hold this bug-fix up. We can do a hasOwnProperty pass at some other time.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions