Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
public class Hello {
@GET
public String sayHello(@PathParam("name") String name) {
return "Hello, " + name + "!";
String safe = name.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;").replace("\"", "&quot;");
return "Hello, " + safe + "!";

Check failure

Code scanning / CodeQL

Cross-site scripting High test

Cross-site scripting vulnerability due to a
user-provided value
.
Comment thread
jtduffy marked this conversation as resolved.
Dismissed
}

@POST
Expand Down
Loading