Conversation
72be5b7 to
06f324b
Compare
| public String displayUserProfile( | ||
| @RequestParam(defaultValue = "Welcome") String message) { | ||
| // Direct output without escaping | ||
| return "<html><body><h1>Profile Message: " + message + "</h1></body></html>"; |
Check failure
Code scanning / Seqra
Potential cross-site scripting (XSS) Error
| // Assign to local variable | ||
| String htmlContent = "<html><body><h1>User Status: " + | ||
| message + "</h1></body></html>"; | ||
| return htmlContent; |
Check failure
Code scanning / Seqra
Potential cross-site scripting (XSS) Error
| public String generateDashboard( | ||
| @RequestParam(defaultValue = "Welcome") String greeting) { | ||
| String htmlContent = buildDashboardContent(greeting); | ||
| return htmlContent; |
Check failure
Code scanning / Seqra
Potential cross-site scripting (XSS) Error
| @RequestParam(defaultValue = "New Message") String content) { | ||
| Profile.MessageTemplate template = new Profile.MessageTemplate(content); | ||
| // Return nested content | ||
| return template.body.content.text; |
Check failure
Code scanning / Seqra
Potential cross-site scripting (XSS) Error
| Profile.UserProfile profile = new Profile.UserProfile(content); | ||
|
|
||
| // Return nested content | ||
| return profile.settings.config.template.body.content.text; |
Check failure
Code scanning / Seqra
Potential cross-site scripting (XSS) Error
| // Construct a page using a chain of builders | ||
| String page = new HtmlPageBuilder().message(message).buildPage(); | ||
|
|
||
| return page; |
Check failure
Code scanning / Seqra
Potential cross-site scripting (XSS) Error
| String page = new HtmlPageBuilder().message(message) | ||
| .format(new DefaultFormatter()).buildPage(); | ||
|
|
||
| return page; |
Check failure
Code scanning / Seqra
Potential cross-site scripting (XSS) Error
| String page = new HtmlPageBuilder().message(message) | ||
| .format(new EscapeFormatter()).buildPage(); | ||
|
|
||
| return page; |
Check failure
Code scanning / Seqra
Potential cross-site scripting (XSS) Error
No description provided.