ANW-2609 Don't allow dangerous html tags in mixed content#3916
Merged
ANW-2609 Don't allow dangerous html tags in mixed content#3916
Conversation
9dabbc5 to
377d70b
Compare
Pull Request Test Coverage Report for Build 21682256042Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
377d70b to
a6073b4
Compare
brianzelip
commented
Feb 4, 2026
| '@id' => AppConfig[:public_proxy_url] + uri, | ||
| '@type' => level_for_md_mapping, | ||
| 'name' => display_string, | ||
| 'name' => strip_mixed_content(display_string), |
Collaborator
Author
There was a problem hiding this comment.
@thimios these two public model changes fix the partial JSON snippet at the top of the page showing even if <script> tags are allowed, ie:
thimios
approved these changes
Feb 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
ANW-2609
This PR fixes a security issue where dangerous html tags like
<script>,<iframe>, etc., could be inserted into mixed content fields on the staff application.Assuming
AppConfig[:allow_mixed_content_title_fields]is set totrue, when you add something like<script>alert('XSS')</script>to a title field, when you save the form, the form invalidation flow kicks in, and the app alerts you that such tags are not allowed.Screenshot