Brambuz (Community Member) asked a question.

Razor pages XSS

Hi in my MVC .NET 7 project, some razor pages getting an XSS flaw CWE ID 80:

 

ex: @Html.Raw(sanitiser.Sanitize(Model.Files))

 

I am modifying my code and adding in all pages HtmlSanitizer.Sanitize:

 

@Html.Raw(sanitiser.Sanitize(ShowDocuments(Model.Files)))

 

but my code getting the same flaw.

 

Please, can you help to resolve this issue?

 

Thank you in advance.


Topics (6)

No articles found
Loading

Ask the Community

Get answers, share a use case, discuss your favorite features, or get input from the community.