Skip to content

fix(appengine): escape greeting.content in java8 and java21 guestbook.jsp - #10397

Merged
maigovannon merged 1 commit into
GoogleCloudPlatform:mainfrom
maigovannon:fix/guestbook-jsp-xss
Dec 1, 2026
Merged

maigovannon merged 1 commit into
GoogleCloudPlatform:mainfrom
maigovannon:fix/guestbook-jsp-xss

Conversation

@maigovannon

Copy link
Copy Markdown
Contributor

Description

Fixes #

Checklist

Testing

  • I have tested this change on a live environment and verified it works as intended.
  • Tests pass: mvn clean verify required
  • Lint passes: mvn -P lint checkstyle:check required
  • Static Analysis: mvn -P lint clean compile pmd:cpd-check spotbugs:check advisory only

Compliance & Style

  • [x ] I have followed Sample Format Guide
  • pom.xml parent set to latest shared-configuration
  • Appropriate changes to README are included in PR
  • This sample adds a new sample directory, and I updated the CODEOWNERS file with the codeowners for this sample
  • This sample adds a new Product API, and I updated the Blunderbuss issue/PR auto-assigner with the codeowners for this sample

Post-Approval Actions

  • [ x] Please merge this PR for me once it is approved

@maigovannon
maigovannon requested review from a team and yoshi-approver as code owners November 30, 2026 09:05
@product-auto-label product-auto-label Bot added api: appengine Issues related to the App Engine Admin API API. samples Issues that are directly related to samples. labels Nov 30, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request secures the guestbook application by escaping the output of greeting content in guestbook.jsp for both the appengine-java8 and appengine-java21 modules, preventing potential Cross-Site Scripting (XSS) vulnerabilities. Additionally, it introduces new unit tests (GuestbookJspTest) in both modules to verify that the JSP files correctly use <c:out> for output escaping. I have no feedback to provide.

@maigovannon
maigovannon merged commit f3d2b61 into GoogleCloudPlatform:main Dec 1, 2026
12 checks passed
@maigovannon
maigovannon deleted the fix/guestbook-jsp-xss branch December 1, 2026 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: appengine Issues related to the App Engine Admin API API. samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants