File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
src/main/java/org/joychou/controller Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 11package org .joychou .controller ;
22
33import org .springframework .stereotype .Controller ;
4+ import org .springframework .web .bind .annotation .GetMapping ;
45import org .springframework .web .bind .annotation .RequestMapping ;
6+ import org .springframework .web .bind .annotation .RequestParam ;
57import org .springframework .web .bind .annotation .ResponseBody ;
68
79import javax .servlet .RequestDispatcher ;
2022@ RequestMapping ("/urlRedirect" )
2123public class URLRedirect {
2224
25+ /**
26+ * @disc: 存在URL重定向漏洞
27+ * @fix: 添加URL白名单 https://github.com/JoyChou93/trident/blob/master/src/main/java/CheckURL.java
28+ */
29+ @ GetMapping ("/redirect" )
30+ public String redirect (@ RequestParam ("url" ) String url ) {
31+ return "redirect:" + url ;
32+ }
33+
2334 /**
2435 * @disc: 存在URL重定向漏洞
2536 * @fix: 添加URL白名单 https://github.com/JoyChou93/trident/blob/master/src/main/java/CheckURL.java
You can’t perform that action at this time.
0 commit comments