Johan Compagner wrote:


Maybe i can improve it even more by just doing that encoding conversion earlier (so not after the redirect but before the redirect and only store the byte[] that could be cheaper :) for strings that only take most of the time 1 byte)

Yep, that's absolutely better.

Also a quick note after grepping wicket's sources.. At wicket/util/crypt/AbstractCrypt.java there are lines:


               return new String(decryptStringToByteArray(text));

and

               return crypt(plainText.getBytes(), Cipher.ENCRYPT_MODE);


These should be:

               return new String(decryptStringToByteArray(text),"UTF-8");

and

return crypt(plainText.getBytes("UTF-8"), Cipher.ENCRYPT_MODE);


It's always BAD thing to use systems default encoding when converting data between Strings and byte-arrays. It will allways break something at some point.

Janne



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to