fix MPP-4093: ensure data-has-premium always has an explicit string value #5404
+1
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes #MPP-4093.
Our new
createElement
call does not implicitly convert booleans.createElement
treatstrue
as a boolean attribute, which results in<firefox-private-relay-addon-data data-has-premium ...>
. In the add-on code, we don't handle the attribute as a boolean - we treat it as a string, so the empty attribute value returns as falsy, which makes the add-on think the user is not premium when they really are.How to test:
With dev server
firefox_relay-2.8.1-dev-server.zip
from https://github.com/mozilla/fx-private-relay-add-on/releases/tag/2.8.1about:debugging
and install thefirefox_relay-2.8.1-dev-server.zip
add-on as described here.Locally
In this repo:
cd frontend && npm run build
python manage.py collectstatic
python manage.py runserver
In the add-on repo:
2.8.1
tagweb-ext run -s src/ -f /Applications/Firefox.app/Contents/MacOS/firefox
l10n changes have been submitted to the l10n repository, if any.I've added or updated relevant docs in the docs/ directory.All UI revisions follow the coding standards, and use Protocol / Nebula colors where applicable (see/frontend/src/styles/colors.scss
).