Wanna see this logo while booting your 2.6 kernel? Click here!

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");
 	    $line = iil_ReadReply($conn->fp);
The patch has to be applied to the file "program/lib/imap.inc".