File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
src/main/java/clap/server/adapter/inbound/web Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ public class XssTestController {
1515
1616 @ GetMapping
1717 @ DevelopOnlyApi
18- @ Operation (summary = "파라미터 xss test" )
18+ @ Operation (summary = "단일 파라미터 xss test" )
1919 public ResponseEntity <String > testGetXss (@ RequestParam String input ) {
2020 log .info ("Received GET input: {}" , input );
2121 return ResponseEntity .ok ("Processed GET input: " + input );
@@ -28,4 +28,20 @@ public ResponseEntity<XssTestResponse> testPostXss(@RequestBody XssTestRequest r
2828 log .info ("Received POST input: {}" , request );
2929 return ResponseEntity .ok (new XssTestResponse (request .content ()));
3030 }
31+
32+ @ GetMapping ("/multi-params" )
33+ @ Operation (summary = "다중 파라미터 XSS 테스트" )
34+ public ResponseEntity <String > testMultiParamXss (@ RequestParam (value = "inputs" , required = false ) String [] inputs ) {
35+ if (inputs == null || inputs .length == 0 ) {
36+ return ResponseEntity .badRequest ().body ("No inputs provided" );
37+ }
38+
39+ StringBuilder response = new StringBuilder ("Processed inputs:\n " );
40+ for (int i = 0 ; i < inputs .length ; i ++) {
41+ log .info ("Received input {}: {}" , i , inputs [i ]);
42+ response .append ("Input " ).append (i ).append (": " ).append (inputs [i ]).append ("\n " );
43+ }
44+
45+ return ResponseEntity .ok (response .toString ());
46+ }
3147}
You can’t perform that action at this time.
0 commit comments