diff --git a/tap-snapshots/test-snyk-to-html.test.ts-TAP.test.js b/tap-snapshots/test-snyk-to-html.test.ts-TAP.test.js index 56a3299..f4f51df 100644 --- a/tap-snapshots/test-snyk-to-html.test.ts-TAP.test.js +++ b/tap-snapshots/test-snyk-to-html.test.ts-TAP.test.js @@ -2670,25 +2670,24 @@ exports[`test/snyk-to-html.test.ts TAP template output displays vulns in descend

If for some reason upgrading is not an option, consider the following workarounds:

    -
  1. Disable handling XML pages and requests to such pages
  2. -
+
  • Disable handling XML pages and requests to such pages

    <constant name="struts.action.extension" value="xhtml,,json" />
             
    -
      -
    1. Override getContentType in XStreamHandler
    2. -
    +
  • +
  • Override getContentType in XStreamHandler

     public class MyXStreamHandler extends XStreamHandler { 
    -           public String getContentType() {
    -             return "not-existing-content-type-@;/&%$#@";
    -           }
    +        public String getContentType() {
    +          return "not-existing-content-type-@;/&%$#@";
    +        }
              }
             
    -
      -
    1. Register the handler by overriding the one provided by the framework in your struts.xml
    2. -
    +
  • +
  • Register the handler by overriding the one provided by the framework in your struts.xml

    <bean type="org.apache.struts2.rest.handler.ContentTypeHandler" name="myXStreamHandmer" class="com.company.MyXStreamHandler"/>
             <constant name="struts.rest.handlerOverride.xml" value="myXStreamHandler"/>
             
    +
  • +

    References