magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.57k stars 9.32k forks source link

xssFiltrationPattern boundary script tag restriction #39379

Open osrecio opened 5 days ago

osrecio commented 5 days ago

Add script boundary as word

If you have an html like:

<body>
    <p class="product-description">
     hello world product description
    </p>
</body>

The problem is the class: product-description

Manual testing scenarios (*)

  1. Create a CMS Page with content:
    <p class="product-description">
     hello world product description
    </p>
  2. Save and see error: image

Contribution checklist (*)

Resolved issues:

  1. [x] resolves magento/magento2#39384: xssFiltrationPattern boundary script tag restriction
m2-assistant[bot] commented 5 days ago

Hi @osrecio. Thank you for your contribution! Here are some useful tips on how you can test your changes using Magento test environment. :exclamation: Automated tests can be triggered manually with an appropriate comment:

<test-build(s)> is a comma-separated list of build names.

Allowed build names are: 1. `Database Compare` 2. `Functional Tests CE` 3. `Functional Tests EE` 4. `Functional Tests B2B` 5. `Integration Tests` 6. `Magento Health Index` 7. `Sample Data Tests CE` 8. `Sample Data Tests EE` 9. `Sample Data Tests B2B` 10. `Static Tests` 11. `Unit Tests` 12. `WebAPI Tests` 13. `Semantic Version Checker`

You can find more information about the builds here :information_source: Run only required test builds during development. Run all test builds before sending your pull request for review.


For more details, review the Code Contributions documentation. Join Magento Community Engineering Slack and ask your questions in #github channel.

osrecio commented 5 days ago

@magento run all tests

engcom-Charlie commented 4 days ago

@magento create issue

ihor-sviziev commented 4 days ago

Approved + added a test coverage for this case:

ihor-sviziev commented 4 days ago

@magento run all tests