Skip to content

Instantly share code, notes, and snippets.

@nipunthathsara
Created June 27, 2022 23:20
Show Gist options
  • Save nipunthathsara/b32fa432e9d59b17340b15733fbf46f3 to your computer and use it in GitHub Desktop.
Save nipunthathsara/b32fa432e9d59b17340b15733fbf46f3 to your computer and use it in GitHub Desktop.
Medium XSS - Controller class and HTML page
<center>
<p style="font-size:2em;" th:utext="${xss} ?: '' " />
</center>
@Controller
public class XssController {
@PostMapping("/home")
public String home(@RequestParam(name="string", required=false, defaultValue="World") String name, Model model) {
model.addAttribute("xss", name);
return "index";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment