mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
JS: Factor out <recommendation> part of qhelp
This commit is contained in:
@@ -19,24 +19,7 @@
|
||||
</p>
|
||||
</overview>
|
||||
|
||||
<recommendation>
|
||||
|
||||
<p>
|
||||
Restrict user inputs in the URL of an outgoing request, in particular:
|
||||
<ul>
|
||||
<li>
|
||||
Avoid user input in the hostname of the URL.
|
||||
Pick the hostname from an allow-list instead of constructing it directly from user input.
|
||||
</li>
|
||||
<li>
|
||||
Take care when user input is part of the pathname of the URL.
|
||||
Restrict the input so that path traversal ("<code>../<code>")
|
||||
cannot be used to redirect the request to an unintended endpoint.
|
||||
</li>
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
</recommendation>
|
||||
<include src="RequestForgeryRecommendation.inc.qhelp"/>
|
||||
|
||||
<example>
|
||||
|
||||
|
||||
@@ -20,24 +20,7 @@
|
||||
</p>
|
||||
</overview>
|
||||
|
||||
<recommendation>
|
||||
|
||||
<p>
|
||||
Restrict user inputs in the URL of an outgoing request, in particular:
|
||||
<ul>
|
||||
<li>
|
||||
Avoid user input in the hostname of the URL.
|
||||
Pick the hostname from an allow-list instead of constructing it directly from user input.
|
||||
</li>
|
||||
<li>
|
||||
Take care when user input is part of the pathname of the URL.
|
||||
Restrict the input so that path traversal ("<code>../<code>")
|
||||
cannot be used to redirect the request to an unintended endpoint.
|
||||
</li>
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
</recommendation>
|
||||
<include src="RequestForgeryRecommendation.inc.qhelp"/>
|
||||
|
||||
<example>
|
||||
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
<!DOCTYPE qhelp PUBLIC
|
||||
"-//Semmle//qhelp//EN"
|
||||
"qhelp.dtd">
|
||||
<qhelp>
|
||||
|
||||
<recommendation>
|
||||
|
||||
<p>
|
||||
Restrict user inputs in the URL of an outgoing request, in particular:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
Avoid user input in the hostname of the URL.
|
||||
Pick the hostname from an allow-list instead of constructing it directly from user input.
|
||||
</li>
|
||||
<li>
|
||||
Take care when user input is part of the pathname of the URL.
|
||||
Restrict the input so that path traversal ("<code>../</code>")
|
||||
cannot be used to redirect the request to an unintended endpoint.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</recommendation>
|
||||
|
||||
</qhelp>
|
||||
Reference in New Issue
Block a user