You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp
+7-4Lines changed: 7 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -3,18 +3,21 @@
3
3
"qhelp.dtd">
4
4
<qhelp>
5
5
<overview>
6
-
<p>The software uses external input as the function name to wrap JSON data and return it to the client as a request response. When there is a cross-domain problem,
7
-
there is a problemof sensitive information leakage.</p>
6
+
<p>The software uses external input as the function name to wrap JSON data and returns it to the client as a request response.
7
+
When there is a cross-domain problem, the problem of sensitive information leakage may occur.</p>
8
8
9
9
</overview>
10
10
<recommendation>
11
11
12
-
<p>Adding `Referer` or random `token` verification processing can effectively prevent the leakage of sensitive information.</p>
12
+
<p>Adding <code>Referer</code>/<code>Origin</code> or random <code>token</code> verification processing can effectively prevent the leakage of sensitive information.</p>
13
13
14
14
</recommendation>
15
15
<example>
16
16
17
-
<p>The following example shows the case of no verification processing and verification processing for the external input function name.</p>
17
+
<p>The following examples show the bad case and the good case respectively. Bad case, such as <code>bad1</code> to <code>bad7</code>,
18
+
will cause information leakage problems when there are cross-domain problems. In a good case, for example, in the <code>good1</code>
19
+
method and the <code>good2</code> method, use the <code>verifToken</code> method to do the random <code>token</code> Verification can
20
+
solve the problem of information leakage caused by cross-domain.</p>
0 commit comments