Skip to content

Commit 697bf35

Browse files
committed
2 parents 906afd2 + 845148d commit 697bf35

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/main/java/org/joychou/controller/URLRedirect.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ public class URLRedirect {
2626
public String redirect(@RequestParam("url") String url) {
2727
return "redirect:" + url;
2828
}
29+
/**
30+
* @disc: 存在URL重定向漏洞
31+
* @fix: 添加URL白名单 https://github.com/JoyChou93/trident/blob/master/src/main/java/CheckURL.java
32+
*/
33+
@GetMapping("/redirect")
34+
public String redirect(@RequestParam("url") String url) {
35+
return "redirect:" + url;
36+
}
37+
2938
/**
3039
* @disc: 存在URL重定向漏洞
3140
* @fix: 添加URL白名单 https://github.com/JoyChou93/trident/blob/master/src/main/java/CheckURL.java

0 commit comments

Comments
 (0)