Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix tests #152

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 11 additions & 12 deletions tap-snapshots/test-snyk-to-html.test.ts-TAP.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2670,25 +2670,24 @@ exports[`test/snyk-to-html.test.ts TAP template output displays vulns in descend
</ul>
<p>If for some reason upgrading is not an option, consider the following workarounds:</p>
<ol>
<li>Disable handling XML pages and requests to such pages</li>
</ol>
<li><p>Disable handling XML pages and requests to such pages</p>
<pre><code class="language-xml">&lt;constant name=&quot;struts.action.extension&quot; value=&quot;xhtml,,json&quot; /&gt;
</code></pre>
<ol start="2">
<li>Override getContentType in XStreamHandler</li>
</ol>
</li>
<li><p>Override getContentType in XStreamHandler</p>
<pre><code class="language-java"> public class MyXStreamHandler extends XStreamHandler {
public String getContentType() {
return &quot;not-existing-content-type-@;/&amp;%$#@&quot;;
}
public String getContentType() {
return &quot;not-existing-content-type-@;/&amp;%$#@&quot;;
}
}
</code></pre>
<ol start="3">
<li>Register the handler by overriding the one provided by the framework in your struts.xml</li>
</ol>
</li>
<li><p>Register the handler by overriding the one provided by the framework in your struts.xml</p>
<pre><code class="language-xml">&lt;bean type=&quot;org.apache.struts2.rest.handler.ContentTypeHandler&quot; name=&quot;myXStreamHandmer&quot; class=&quot;com.company.MyXStreamHandler&quot;/&gt;
&lt;constant name=&quot;struts.rest.handlerOverride.xml&quot; value=&quot;myXStreamHandler&quot;/&gt;
</code></pre>
</li>
</ol>
<h2 id="references">References</h2>
<ul>
<li><a href="https://lgtm.com/blog/apache_struts_CVE-2017-9805_announcement">LGTM Advisory</a></li>
Expand Down Expand Up @@ -3597,7 +3596,7 @@ exports[`test/snyk-to-html.test.ts TAP template output displays vulns in descend
<li><a href="https://github.com/apache/commons-fileupload/blob/b1498c9877d751f8bc4635a6f252ebdfcba28518/src/changes/changes.xml#L84">Github ChangeLog</a></li>
<li><a href="https://bugzilla.redhat.com/show_bug.cgi?id=1349475">Redhat Bugzilla</a></li>
<li><a href="http://mail-archives.us.apache.org/mod_mbox/www-announce/201606.mbox/%[email protected]%3E">Apache Mailing Archives</a></li>
<li><a href="http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/RELEASE-NOTES.txt?r1=1745717&r2=1749637&diff_format=h">Apache-SVN</a></li>
<li><a href="http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/RELEASE-NOTES.txt?r1=1745717&amp;r2=1749637&amp;diff_format=h">Apache-SVN</a></li>
<li><a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-3092">CVE</a></li>
</ul>

Expand Down