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

refactor script.js to pass firefox review #29

Closed
warengonzaga opened this issue Jul 14, 2023 · 5 comments · Fixed by #25 or #31
Closed

refactor script.js to pass firefox review #29

warengonzaga opened this issue Jul 14, 2023 · 5 comments · Fixed by #25 or #31
Assignees
Labels
good-first-issue For First-time Contributors (Issue) help wanted Need Help (Issue/PR) tweak Enhancements (Issue/PR)
Milestone

Comments

@warengonzaga
Copy link
Member

Details

The version 0.1.3 didn't pass the review from Firefox add-ons due to the following reasons below.

This add-on is creating DOM nodes from HTML strings containing potentially unsanitized data, by assigning to innerHTML, jQuery.html, or through similar means. Aside from being inefficient, this is a major security risk. For more information, see https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Safely_inserting_external_content_into_a_page . Here are some examples that were discovered:

  • script.js lines 8, 27-29, 40-43

Task

We need help updating or refactoring the script.js to align with their requested changes.

@warengonzaga warengonzaga added good-first-issue For First-time Contributors (Issue) help wanted Need Help (Issue/PR) tweak Enhancements (Issue/PR) labels Jul 14, 2023
@warengonzaga warengonzaga added this to the v0.1.4 🌱 milestone Jul 14, 2023
@warengonzaga warengonzaga linked a pull request Jul 15, 2023 that will close this issue
@warengonzaga warengonzaga linked a pull request Jul 16, 2023 that will close this issue
@warengonzaga
Copy link
Member Author

Merged #31 into #25 all thanks to @JBenedicto13 for taking the time to fix and refactoring the code base and improving the project. Salute! 🫡

@warengonzaga
Copy link
Member Author

@JBenedicto13 unfortunately, we didn't pass the review again. Kindly see the details from Firefox team.

Details:
This add-on didn't pass review because of the following problems:

  1. This add-on is creating DOM nodes from HTML strings containing potentially unsanitized data, by assigning to innerHTML, jQuery.html, or through similar means. Aside from being inefficient, this is a major security risk. For more information, see https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Safely_inserting_external_content_into_a_page . Here are some examples that were discovered:
  • script.js line 8

Please address the issues raised in the reviewer's notes and inquire about any unclear items. Afterwards, please upload a new version of your add-on at https://addons.mozilla.org/en-US/developers/addon/matuto/versions.

Thank you for your attention.

@warengonzaga warengonzaga reopened this Aug 11, 2023
@JBenedicto13
Copy link
Member

I have come to a solution of using DOMPurify to purify the string on line 8 please take a look at my pull request. Thanks.

@warengonzaga
Copy link
Member Author

Alright checking and testing @JBenedicto13

@warengonzaga
Copy link
Member Author

Closing, as the fix is available in the #34
Let's try again to support Firefox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good-first-issue For First-time Contributors (Issue) help wanted Need Help (Issue/PR) tweak Enhancements (Issue/PR)
Projects
None yet
2 participants