Opened 5 years ago
Closed 5 years ago
#1484814 closed Bugs (fixed)
RC hangs when saving special char attachments (dovecot only)
| Reported by: | mattenklicker | Owned by: | |
|---|---|---|---|
| Priority: | 5 | Milestone: | 0.2-beta |
| Component: | MIME parsing | Version: | git-master |
| 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 (11)
comment:1 Changed 5 years ago by seansan
- Milestone set to 0.1-stable
comment:2 Changed 5 years ago by thomasb
- Milestone changed from 0.1-stable to 0.1.5
Later. Need to verify if RoundCube really does something wrong.
comment:3 Changed 5 years ago by alec
I'm using dovecot and can verify, but which special chars?
comment:4 Changed 5 years 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
comment:5 Changed 5 years 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.
comment:6 Changed 5 years 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.
comment:7 Changed 5 years ago by alec
- Component changed from IMAP connection to Database
- Milestone changed from 0.1.5 to 0.1.2
comment:8 Changed 5 years 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.
comment:9 Changed 5 years 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.
comment:10 Changed 5 years 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
comment:13 Changed 5 years ago by alec
- Component changed from Database to MIME parsing
- Resolution set to fixed
- Status changed from new to closed
It should working with svn-trunk with some fixes in [1c253664].

Review for 0.1 stable - otherwise move to 0.1.1