Tuesday, February 23, 2010

cas 3.3.5 and utf8 passwords

After we upgraded to CAS 3.3.5 users with foreign character passwords failed authentication. Two things were missing:

in /WEB-INF/web.xml I added the following filter:



SetCharacterEncodingFilter
org.springframework.web.filter.CharacterEncodingFilter

encoding
UTF-8


forceEncoding
true




SetCharacterEncodingFilter
/*





And then on top.jsp and casLoginView.jsp I needed to add this line:

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>

And now we're back in business.

No comments: