I am working with some legacy web apps, created with ASP.NET Webforms, that are being scanned by using Trustwave. We are using .NET Framework 4.6.
The scan report is showing that we have an output encoding issue, here are some details:
Types of encoding detected:
URL encoding
Unencoded injection string: **CENZIC123 !"#$%&'()*+,-./:;<=>?@[]^_`{|}~\CENZIC456**
Characters that were not encoded in the detection string: !()*-._~
Characters that should have been encoded for URL encoding: ****!()~****
Injection URI: https://mywebsite/Authentication/Login.aspx?CENZIC123%20!%22%23%24%25%26'()*%2B%2C-.%2F%3A%3B%3C%3D%3E%3F%40%5B%5D%5E_%60%7B%7C%7D~%5CCENZIC456
I have tried to fix this by changing the default HTTP encoder to the AntiXss Encoder in the HTTP runtime node inside my Web.Config, as Microsoft documentation suggest. But I still having that issue reported in the scans.
What should I do to fix this?
Thanks.