Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid jsessionid in URLs when indexed by GoogleBot #46

Closed
danielfernandez opened this issue Aug 7, 2012 · 2 comments
Closed

Avoid jsessionid in URLs when indexed by GoogleBot #46

danielfernandez opened this issue Aug 7, 2012 · 2 comments

Comments

@danielfernandez
Copy link
Member

Thymeleaf currently adds the "jsessionid" fragment to any context-relative or server-relative URLs when a user session is active in the server (request.getSession(false) is not null).

Although most public sites will not be creating sessions for non-authenticated users (and thymeleaf allows this), it might happen that some sites do, and therefore ;jsessionid=xxxxx fragments would be added to the Google index, which is a security risk.

A purpose-specific fix for this would be checking, when adding the ;jsessionid part, that the "User-Agent" header does not include GoogleBot.

Note that this could be nevertheless a problem for session-creating public websites, because Google (which is cookie-less) could be creating a new session for every page it indexes.

@ghost ghost assigned danielfernandez Aug 7, 2012
@danielfernandez
Copy link
Member Author

Google crawler User-Agent specification: http://support.google.com/webmasters/bin/answer.py?hl=en&answer=1061943

@danielfernandez
Copy link
Member Author

Fixed and added to 2.0.12-SNAPSHOT

@danielfernandez danielfernandez modified the milestones: Thymeleaf 2.0, Thymeleaf 2.0.12 Dec 26, 2020
rwinch pushed a commit to rwinch/thymeleaf that referenced this issue Dec 4, 2021
rwinch pushed a commit to rwinch/thymeleaf that referenced this issue Dec 4, 2021
thymeleaf#46 Add MapAccessor to ThymeleafEvaluationContext
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant