Shibboleth, Tomcat, AJP and UTF-8 conversion
Cantor, Scott
cantor.2 at osu.edu
Thu Oct 20 10:13:51 EDT 2016
> It seems to me, its more like Tomcat is following the spec and its having this
> unpleasant side effect in a certain Shibboleth use case.
The spec itself is broken, I would say. It can't assume an encoding given that the client can use any.
In any case, I thought the usual fix for this was to add the encoding to the AJP connector. People have certainly said that that works.
> String value= request.getHeader("givenName");
> value= new String( value.getBytes("ISO-8859-1"), "UTF-8");
>
> In my case I'll have to use request.getAttribute("givenName"); because my
> data is delivered via attributes.
The trick there is running the encoding switch against the raw bytes of the source string, but it doesn't matter what the source string is.
Of course, I have no idea what Tomcat does or doesn't do with attributes vs. headers.
-- Scott
More information about the users
mailing list