Skip to content

release(26.04.11-03): cherry-pick #35553 security fix onto 26.04.11-02#35634

Closed
sfreudenthaler wants to merge 10 commits into
release-26.04.11-02from
release-26.04.11-03
Closed

release(26.04.11-03): cherry-pick #35553 security fix onto 26.04.11-02#35634
sfreudenthaler wants to merge 10 commits into
release-26.04.11-02from
release-26.04.11-03

Conversation

@sfreudenthaler

@sfreudenthaler sfreudenthaler commented May 8, 2026

Copy link
Copy Markdown
Member

Summary

Customer-targeted patched build for Lennox, who is currently pinned to 26.04.11-02 and cannot upgrade through the 26.04.28-x line.

What's in this branch

v26.04.11-02 + 9 commits cherry-picked from #35553 (the same set that landed on release-26.04.28-03):

ac83b2fd16 fix(publisher): parameterize getPublishAuditStatuses bundle-id query
8e0a64acb3 test(publisher): regression tests for getPublishAuditStatuses parameterization
97009364f9 Apply suggestions from code review
0f3a942a39 fix: remove duplicate placeholders block from accidental suggestion apply
3369c2bbc0 fix(rest): require backend user + publishing-queue portlet on AuditPublishingResource
37700cf3e7 test: use dotCMS-specific SecurityException in AuditPublishingResourceTest
408bcc6cdf add AuditPublishingResourceTest to the MainSuite2a
293c081ade use PP authorization in AuditPublishingResource instead of WebResource.InitBuilder
c1b78bd81d fix(publisher): add PP auth header to audit poll and prevent 500 on missing token

Tip: c1b78bd81d.

Cherry-pick cleanliness

All 9 commits applied with no manual conflict resolution. One auto-merge in PublisherQueueJob.java resolved cleanly — the 26.04.11 baseline uses com.dotcms.repackage.com.google.common.collect import paths instead of the direct Guava imports on the 26.04.28 line. Unrelated to the security fix.

Cross-checked against v26.04.28-03: AuditPublishingResource.java, PublishAuditAPIImpl.java, and AuditPublishingResourceTest.java are byte-identical to 28-03 — the security fix landed exactly as it did there.

Not in scope

Resulting image

Image will be tagged 26.04.11-03_<sha> (SHA-suffix convention). Once built, the infra-as-code repo will bump lennox/prod-2, lennox/staging-2, and lennox-dr/prod-2 (already excluded from the current deploy wave) to that tag in a separate PR.

Test plan

  • CI / LTS workflow builds image successfully off this branch
  • Confirm resulting image runs URL-mapped pages on a Lennox-shaped site (regression-free, since baseline is 26.04.11-02)
  • Confirm /api/auditPublishing/get and /api/auditPublishing/getAll reject anonymous callers (security fix in effect)

🤖 Generated with Claude Code

refs: https://github.com/dotCMS/private-issues/issues/581

mbiuki and others added 9 commits May 8, 2026 16:29
Replaces the manually quoted IN-clause with bound parameters so caller-supplied
bundle ids cannot break out of the SQL literal. Also guards against null/empty
input (which previously NPE'd or produced invalid `IN ()` SQL), and corrects
the catch-block logger to use this class and ERROR level (matching the sibling
deletePublishAuditStatus method).

Refs: dotCMS/private-issues#581
…erization

Adds four integration tests for getPublishAuditStatuses(List<String>):
- happy path returns the requested rows and excludes others
- empty list returns an empty result without producing invalid `IN ()` SQL
- null list returns an empty result without NPE
- bundle ids containing SQL meta-characters (single quotes, OR 1=1,
  '; DROP TABLE; --, comment terminators, escaped quotes) are bound as
  parameters and produce no rows; the audit table remains intact

Refs: dotCMS/private-issues#581
Co-authored-by: semgrep-code-dotcms-test[bot] <183154938+semgrep-code-dotcms-test[bot]@users.noreply.github.com>
…pply

The "Apply suggestion" action on the Semgrep bot's review (commit f68ff49)
appended the bot's suggested code on top of the existing parameterized fix
instead of replacing it, leaving two `placeholders` declarations in the same
method (compile error: "variable placeholders is already defined").

The bot's suggestion was functionally identical to the committed code; the
existing parameterized fix is correct. Removing the duplicate block.
…blishingResource

Adds WebResource.InitBuilder authentication checks to GET /api/auditPublishing/get
and POST /api/auditPublishing/getAll. Both endpoints previously skipped
WebResource.init entirely, so an unauthenticated caller could enumerate publish
audit status for any bundle id (or list of ids) — the SQL injection in the
underlying DB method was the worst-case shape, but even after parameterization
the data exposure remains until the resource is gated.

Both endpoints now require:
- a backend (CMS) user, not a frontend user
- the `publishing-queue` portlet permission
- rejection when no user is present (no anonymous access)

Addresses review feedback from @wezell.
…eTest

The auth check throws com.dotcms.rest.exception.SecurityException
(WebApplicationException subclass), not java.lang.SecurityException.
@test(expected = ...) defaults to the imported class, so a no-arg import
was matching the wrong type and the test errored even though the auth
worked correctly.
…issing token

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Backports the LTS workflow fix from main (PR #35612) to enable manual
triggering with a version override and dynamic version resolution from
.mvn/maven.config.

Same change as d408d3e (applied to release-26.04.28-03).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sfreudenthaler sfreudenthaler changed the base branch from main to release-26.04.11-02 May 9, 2026 02:27
@dotCMS-Machine-User dotCMS-Machine-User deleted the release-26.04.11-03 branch May 9, 2026 02:31
@sfreudenthaler sfreudenthaler restored the release-26.04.11-03 branch May 9, 2026 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants