apache / apache/grails-core

Special character encoding issues with SingleSignOutFilter

Open
#15,921 12 comments 0 reactions 1 assignee Claimed by @guillermocalvo View on GitHub
relates-to:spring-security
Dominant language
Groovy
Stars
2.9k
Forks
975
Avg merge
1d 22h
Merged PRs (30d)
92

Description

The Grails default UTF-8 `characterEncodingFilter` no longer encodes special characters correctly in an app with the Spring Security CAS plugin.

I believe this is due to the `SingleSignOutFilter`'s registration order being set to `Ordered.HIGHEST_PRECEDENCE` and thus being first in the filter chain instead of the encoding filter. Not that this is the solution, but by setting the SingleSignOutFilter's order to `Ordered.HIGHEST_PRECEDENCE + 1`, and customizing characterEncodingFilter with order `Ordered.HIGHEST_PRECEDENCE` seems to fix the problem.

This is most easily demonstrated by submitting a post request to a controller with special characters, e.g. ™, ®, etc. in it.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.