Ticket #1484814 (closed Bugs: fixed)

Opened 8 months ago

Last modified 4 months ago

RC hangs when saving special char attachments (dovecot only)

Reported by: mattenklicker Owned by:
Priority: 5 Milestone: 0.2-beta
Component: MIME parsing Version: svn-trunk
Severity: normal Keywords:
Cc:

Description

When using dovecot as imap server, I can't send mails with attachments which filenames contain special chars. Roundcube hangs at "Sending message..." In the log following appears repeatedly:

[01-Mar-2008 12:07:12 +0100]: * CAPABILITY IMAP4rev1 SASL-IR SORT THREAD=REFERENCES MULTIAPPEND UNSELECT LITERAL+ IDLE CHILDREN NAMESPACE LOGIN-REFERRALS UIDPLUS LIST-EXTENDED I18NLEVEL=1 STARTTLS AUTH=PLAIN
cp01 OK Capability completed.
Tried PLAIN: Resource id #34

The sniffed imap-connections looks like that and RC does that every minute or so.

a001 OK Logged in.
ns1 NAMESPACE
* NAMESPACE (("" ".")) NIL NIL
ns1 OK Namespace completed.
I LOGOUT
* BYE Logging out
I OK Logout completed.

This happens with dovecot 1.0.x and 1.1.x.

Change History

Changed 8 months ago by seansan

  • milestone set to 0.1-stable

Review for 0.1 stable - otherwise move to 0.1.1

Changed 8 months ago by thomasb

  • milestone changed from 0.1-stable to 0.1.5

Later. Need to verify if RoundCube really does something wrong.

Changed 8 months ago by alec

I'm using dovecot and can verify, but which special chars?

Changed 8 months ago by mattenklicker

Sorry, it's not dovecot related. I thought so, because others reported to have no problems with courier. I tried now courier and it's the same. It seems to be gentoo related. But I don't know how to track this down. The logs are not very useful in this case. BTW I tried this attachment:

echo 'äß?$÷ξá†@}|' > '/tmp/äß?$÷ξá†@}|'

php: 5.2.5 apache: 2.2.8

Changed 7 months ago by mattenklicker

Found it. It is mysql related. I saw many MDB2.php accesses with inotifywatch and tried sqlite instead of mysql. Encoding of filenames isn't correct i think:

filename="=?ISO-8859-1?B?6Q==?="

(only an "é"), but it works. I kicked out PEAR Auth DB Mail MDB2 Net from program/lib and used the distri-ones. I have correct filenames with sqlite now, but mysql is still not working.

Changed 7 months ago by mattenklicker

I think special chars are not escaped correctly for mysql. If it is only a ' , it works partly: A filename like "john's.pdf" is escaped, but before mysql. rc changes the filename to "john\'s.pdf". In mysql-log it is "john\\\'s.pdf". If I use "äß?$÷ξá†@}|" as filename it appears in mysql log as: s:18:\"äß?$÷ξá†@}|\" which seems to be unescaped. Trying a filename like

echo "äß\"?'\\$÷ξá†@}|" > "/tmp/äß\"?'\\$÷ξá†@}|"

Roundcube crashes after upload. I can't click the remove-button.

Changed 5 months ago by alec

  • component changed from IMAP connection to Database
  • milestone changed from 0.1.5 to 0.1.2

Changed 5 months ago by mattenklicker

Sorry, only " and ' have to be escaped, i think, so thats not the problem. BTW: behavior changend in the meantime: Filenames like äß\"?'\\$÷ξá†@}| are displayed as: $÷ξá†@}| to click the remove button is impossible. Message is sent without attachment. Filenames like ä? are displayed as is, to click the remove button is impossible, rc hangs when sending the message.

Changed 4 months ago by till

  • milestone changed from 0.2-alpha to 0.2-beta

Please supply the entire source of an example message and upload it as an attachment, or via http://testing.roundcube.net.

Postponing until this requirement is met.

Changed 4 months ago by mattenklicker

Finally solved it! It was a quite old database. Some fields had ascii_general_ci collation. Switching to utf8 solved it.

BTW: There are still little problems with very exotic file names: ä?\ becomes äUTF-8?Q?=C3=A4=3F

Changed 4 months ago by alec

  • status changed from new to closed
  • resolution set to fixed
  • component changed from Database to MIME parsing

It should working with svn-trunk with some fixes in r1576.

Note: See TracTickets for help on using tickets.