Repository navigation
Don't start a session for Roller UI stylesheets, scripts and images - #310
Merged
Merged
Conversation
LoadSaltFilter started a session and put a form salt in the cache for every request under /roller-ui, including the static files in /roller-ui/styles, /roller-ui/scripts and /roller-ui/images. It now skips those, as it skips weblog rendering requests.
snoopdave
reviewed
Nov 18, 2026
snoopdave
left a comment
Contributor
There was a problem hiding this comment.
Review of 4bfd8d2fa: The new test would catch the original session behavior for the three listed directories. The front page also uses images under /roller-ui/theme/, which this patch still routes through session creation. Compared with twin #332, this PR omits two test checks.
…iles still reach the filter chain Requests under /roller-ui/theme/, such as the front-page tab images, no longer create a session. The test now covers that directory, checks that every static request is passed on to the rest of the chain, and checks that /roller-ui/styles-settings.rol, which only shares a prefix with a static directory, still gets a salt.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LoadSaltFilterruns for every request under/roller-ui, except weblog rendering requests. So an anonymous visitor's request for a stylesheet, script or image under/roller-ui/styles,/roller-ui/scripts,/roller-ui/imagesor/roller-ui/theme(such as the front-page tab images) started a session (aJSESSIONIDcookie) and added an unused form salt to the salt cache. It now skips those paths, as it skips/roller-ui/rendering/.Together with #300, which takes those paths out of the Spring Security chain, Roller's UI static files can be cached.
LoadSaltFilterTestchecks that the four kinds of static file get no session and no salt and are still passed on to the rest of the filter chain; other/roller-uipages still get a salt, including/roller-ui/styles-settings.rol, which only shares a prefix with a static directory.jetty:run,roller.css,date-fields.jsandfeather.svgcome back withoutSet-Cookie, while the login page still sets one.mvn testpasses.