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

unsafe_html fails on all iframes if BUILD_LIVE_SAMPLES_BASE_URL is empty #3215

Closed
peterbe opened this issue Mar 12, 2021 · 0 comments · Fixed by #3216
Closed

unsafe_html fails on all iframes if BUILD_LIVE_SAMPLES_BASE_URL is empty #3215

peterbe opened this issue Mar 12, 2021 · 0 comments · Fixed by #3216
Assignees

Comments

@peterbe
Copy link
Contributor

peterbe commented Mar 12, 2021

See https://github.com/mdn/content/pull/3064/checks?check_run_id=2095600358

Injecting flaws into files/en-us/mdn/kitchensink/index.html (/en-US/docs/MDN/Kitchensink) failed.
Error: unsafe_html flaws: <script> tag found,Unsafe <iframe> 'src' value (https://interactive-examples.mdn.mozilla.net/pages/tabbed/abbr.html),Unsafe <iframe> 'src' value (https://interactive-examples.mdn.mozilla.net/pages/css/order.html),Unsafe <iframe> 'src' value (https://interactive-examples.mdn.mozilla.net/pages/js/regexp-assertions.html),Unsafe <iframe> 'src' value (/en-US/docs/Games/Techniques/2D_collision_detection/_samples_/Rect_code),Unsafe <iframe> 'src' value (/en-US/docs/MDN/Kitchensink/_samples_/inheritance_diagram),Unsafe <iframe> 'src' value (https://mdn.github.io/web-tech-games/index.html),'onerror' on-handler found in h2

It's a bit hard and ugly to see but it's basically complaining about the https://interactive-examples.mdn.mozilla.net/pages/tabbed/abbr.html iframe src.
It happens because...

export BUILD_LIVE_SAMPLES_BASE_URL=

so now the list of safeIFrameSrcs contains an entry which is an empty string.

@peterbe peterbe self-assigned this Mar 12, 2021
peterbe added a commit to peterbe/yari that referenced this issue Mar 12, 2021
escattone pushed a commit that referenced this issue Mar 12, 2021
* skip empty srcs for safe iframe srcs

Fixes #3215

* feedbacked
peterbe added a commit to peterbe/yari that referenced this issue Jun 1, 2021
* skip empty srcs for safe iframe srcs

Fixes mdn#3215

* feedbacked
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 a pull request may close this issue.

1 participant