Login Main site Create account

27.09.2006 10:59

roundcubemail and german umlauts


Today one of my users experienced the first problem with the new webmail software roundcubemail.
He wasn't able to login with his password which contained german umlauts (ä, ö, ü, ...). After having a look at the rcm source I found out that the problem was in the imap.inc library (originally written for the ilohamail webmail software) and was quite trivial after all.

After finishing this blog entry, I'll drop the maintainers a line but in the meantime, here goes the patch:
--- imap.inc.orig	2006-09-27 10:51:22.408713456 +0200
+++ imap.inc	2006-09-27 10:50:26.982139576 +0200
@@ -225,7 +225,9 @@
 
 function iil_C_Login(&$conn, $user, $password){
 
-    fputs($conn->fp, "a001 LOGIN $user \"$password\"\r\n");
+    // $passwords needs to be utf8_decode'd so that the german umlauts don't
+    // get corrupted. Updated by php@tuxx-home.at, ag
+    fputs($conn->fp, "a001 LOGIN $user \"" . utf8_decode($password) . "\"\r\n");
 		
 	do{
 	    $line = iil_ReadReply($conn->fp);
The patch has to be applied to the file "program/lib/imap.inc".

Downloads:
Currently no comments to this entry (http://tuxx-home.at/archives/2006/09/27/T10_59_51/index.html)


Your comment (HTML tags will be stripped !!):

To verify You are not a bot, type down text from this image.

Your try: