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

Add https://*/* permission to avoid fetch error in Firefox #127

Merged
merged 1 commit into from
Mar 21, 2021

Conversation

sharon-wang
Copy link
Member

The monetization icon was broken in Firefox (not indicating if a site is monetized). This is because we had removed the <all_urls> permission some time ago, but Firefox needs at least the https permission in the manifest since we are making fetch requests to HTTPS endpoints (to validate payment pointers). This change fixes #120.

Firefox is unable to successfully fetch (results in "TypeError: NetworkError when attempting to fetch resource") without permission to https. We fetch SPSP endpoints to check that they are valid, so that we know the payment pointers are legitimate. The monetization icon will not be set if we cannot validate the payment pointer.

This permission doesn't seem to be necessary on Chromium-based browsers.

NOTE that if upon resubmission to Chrome/Edge we get rejected because of the HTTPS permission (and assuming Firefox approves of the submission), then we will have to separately package the extension for Chromium and Firefox with the permission removed for Chromium and included for Firefox.

Firefox is unable to successfully fetch (results in
"TypeError: NetworkError when attempting to fetch resource")
without having permission to https. We fetch SPSP endpoints to
check that they are valid, so that we know the payment pointers
are legitimate. The monetization icon will not be set if we cannot
validate the payment pointer.

This permission doesn't seem to be necessary on
Chromium-based browsers.

Signed-off-by: sharon-wang <[email protected]>
@sharon-wang sharon-wang requested a review from vezwork March 21, 2021 04:21
@vezwork
Copy link
Member

vezwork commented Mar 21, 2021

We can try testing on https://www.youtube.com/watch?v=sApKXmwhg4g to see if youtube monetization works.

Edit: and it works✅🙂

@vezwork
Copy link
Member

vezwork commented Mar 21, 2021

Tested on monetized sites (both with and without a provider), and on monetized youtube (both with and without a provider) and it is working great!

Copy link
Member

@vezwork vezwork left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm and tested

@vezwork vezwork merged commit e1d1adc into esse-dev:master Mar 21, 2021
@sharon-wang sharon-wang deleted the ffmonetization branch April 4, 2021 18:50
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.

[BUG] Akita not detecting monetization in Firefox
2 participants