alecpl
2010-10-20 2ae58f1b6782ad03cb4801b1eb2684f0d9351b32
- Fix content-type name regexp according to RFC4288.4.2


1 files modified
4 ■■■■ changed files
program/include/rcube_message.php 4 ●●●● patch | view | raw | blame | history
program/include/rcube_message.php
@@ -468,8 +468,8 @@
                    else if ($part_orig_mimetype == 'message/rfc822') {
                        $this->parse_structure($mail_part, true);
                    }
                    // is a regular attachment
                    else if (preg_match('!^[a-z0-9-.+_]+/[a-z0-9-.+_]+$!i', $part_mimetype)) {
                    // is a regular attachment (content-type name regexp according to RFC4288.4.2)
                    else if (preg_match('/^[a-z0-9!#$&.+^_-]+\/[a-z0-9!#$&.+^_-]+$/i', $part_mimetype)) {
                        if (!$mail_part->filename)
                            $mail_part->filename = 'Part '.$mail_part->mime_id;
                        $this->attachments[] = $mail_part;