if you use jforum in different language as chinese or japanese , you will find you can not use those language to register or login in. the reason is that in cookie the username must encoding bing URLEncoding , i modifying two place to correct this bug ,the example just as below:
public
String authenticateUser(RequestContext request) { // required method
User user = new User();
Cookie myCookie = ControllerUtils.getCookie("JforumSSO"); // my app login cookie
String username=null;
if (myCookie != null) {
//DAOManager manager = new JndiDAOManager(); // my apps database
UserDAO userDAO = DataAccessDriver.getInstance().newUserDAO();
//shuichao, modify this bug 1
String cookieUserName=URLDecoder.decode(myCookie.getValue());
user = userDAO.selectByName(cookieUserName);
} else
return null; // no cookie found
request.getSessionContext().setAttribute("password", user.getPassword()); // set correct password
request.getSessionContext().setAttribute("email", user.getUsername()); // and email address (my username)
//shuichao, modify this bug 2
ControllerUtils.addCookie("JforumSSO",URLEncoder.encode(user.getUsername())); //refresh
return user.getUsername(); // jforum username
}
[originally posted on jforum.net by shuichao]