You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Sanitize XHTML from ReqIF files before rendering it
#57
I have verified that I am running the latest version of the reqifviewer
I have searched open and closed issues to ensure it has not already been reported
Description
XHTML from the uploaded ReqIF file is rendered with new MarkupString(...) without sanitizing (for example in AttributeValuesComponent, SpecificationDetailsPage and the tree labels). A crafted file can inject script, for example through an onerror attribute, into the page of whoever opens it.
Acceptance criteria
All XHTML from attribute values, display names and tree labels goes through one sanitizing helper; no new MarkupString(...) on file content elsewhere.
Allow-list based on the XHTML modules ReqIF uses (text, lists, tables, object); scripts, event-handler attributes and javascript: URLs are removed. HtmlSanitizer is already a dependency of Blazor Blueprint.
Tests with a malicious fixture (<script>, onerror, javascript: link) prove nothing executable is rendered.
Steps to Reproduce
Load requirements-and-objects.reqifz or ProR_Traceability-Template-v1.0.reqif (reqifviewer.Tests/TestData) and look at the pages mentioned above.
Activity