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-601/SpringUrlRedirect.qhelp
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -21,10 +21,10 @@ redirects on the server; then choose from that list based on the user input prov
21
21
<example>
22
22
23
23
<p>The following examples show the bad case and the good case respectively.
24
-
In <code>bad1</code> method and <code>bad2</code> method and <code>bad3</code> method and
25
-
<code>bad4</code> method, shows an HTTP request parameter being used directly in a URL redirect
26
-
without validating the input, which facilitates phishing attacks. In <code>good1</code> method,
27
-
shows how to solve this problem by verifying whether the user input is a known fixed string beginning.
24
+
The <code>bad</code> methods show an HTTP request parameter being used directly
25
+
in a URL redirect without validating the input, which facilitates phishing attacks.
26
+
In the <code>good1</code> method, it is shown how to solve this problem by verifying whether
27
+
the user input is a known fixed string beginning.
28
28
</p>
29
29
30
30
<samplesrc="SpringUrlRedirect.java" />
@@ -33,5 +33,6 @@ shows how to solve this problem by verifying whether the user input is a known f
33
33
<references>
34
34
<li>A Guide To Spring Redirects: <ahref="https://www.baeldung.com/spring-redirect-and-forward">Spring Redirects</a>.</li>
35
35
<li>Url redirection - attack and defense: <ahref="https://www.virtuesecurity.com/kb/url-redirection-attack-and-defense/">Url Redirection</a>.</li>
36
+
<li>How to redirect to an external URL from Spring Boot REST Controller (Post/Redirect/Get pattern)?: <ahref="https://fullstackdeveloper.guru/2021/03/12/how-to-redirect-to-an-external-url-from-spring-boot-rest-controller/">ResponseEntity Redirection</a>.</li>
0 commit comments