Skip to content

Serve weblog pages, feeds, search and resources only through forwards - #370

Merged
snoopdave merged 1 commit into
roller-6.1.xfrom
rendering-forward-only-6.1.x
Nov 21, 2026
Merged

snoopdave merged 1 commit into
roller-6.1.xfrom
rendering-forward-only-6.1.x

Conversation

@snoopdave

Copy link
Copy Markdown
Contributor

Roller forwards a weblog's public URLs to its internal rendering servlets. This makes those forwards the only way in for weblog content.

  • Direct requests answer 404. A new RenderingForwardOnlyFilter, mapped for REQUEST dispatches only, covers /roller-ui/rendering/page/, feed/, search/ and resources/. Forwards from the weblog's own URLs pass, so rules a site sets for those URLs apply.
  • Direct links keep working. Comment posts, RSD and /roller-ui/rendering/media-resources/ links in entries are not filtered. Every in-code use of the four paths is a server-side forward.
  • Tests. RenderingForwardOnlyFilterTest fails without the change. The full 6.1.x unit suite passes on JDK 11 (818 tests).

Master's #300 does the equivalent in its Java security configuration.

Roller forwards a weblog's public URLs to the rendering servlets. Direct
requests to the page, feed, search and resources servlets now answer 404,
so a weblog's content is reached only at the weblog's own addresses. Comment
posts, RSD and media file links keep their direct addresses.

@mraible mraible 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.

Looks good. The filter's four patterns are the same as the PageServlet, FeedServlet, SearchServlet and ResourceServlet mappings, so any request the container hands straight to those servlets meets the filter first, and the forwards from WeblogRequestMapper and CommentServlet pass. Media resources, comments and RSD stay outside it, and I didn't find any template or JSP that links to the four paths directly.

@snoopdave
snoopdave merged commit c6a4c4e into roller-6.1.x Nov 21, 2026
7 checks passed
@snoopdave
snoopdave deleted the rendering-forward-only-6.1.x branch November 21, 2026 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants