Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: prevent Object properties to be detected as existent files by tabs.executeScript rule #1707

Merged

Conversation

rpl
Copy link
Member

@rpl rpl commented Dec 15, 2017

This PR fix a small issue in the rule that checks if the files used in a tabs.executeScript API calls actually exist (even if it is unlikely that an extension would call one of its content script file "constructor", or like other Object properties, the rule is supposed to raise an error if the filename is not an actual property of the existingFiles object).

@rpl rpl requested a review from EnTeQuAk December 15, 2017 15:22
@rpl
Copy link
Member Author

rpl commented Dec 15, 2017

@EnTeQuAk it could be nice to have an helper function to use where we check that a filename exists, so that it would be harder to get caught by the subtle differences between using ... in ... or Object.hasOwnProperties to check for the existence of a property name in an object.

@rpl rpl force-pushed the fix/use-hasOwnProperty-in-executeScript-rule branch from bfe99f2 to 6516c99 Compare December 15, 2017 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants