Changeset 4114 in subversion


Ignore:
Timestamp:
Oct 20, 2010 7:27:39 AM (3 years ago)
Author:
alec
Message:
  • Fix content-type name regexp according to RFC4288.4.2
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/include/rcube_message.php

    r4112 r4114  
    4646    private $inline_parts = array(); 
    4747    private $parse_alternative = false; 
    48    
     48 
    4949    public $uid = null; 
    5050    public $headers; 
     
    5656    public $sender = null; 
    5757    public $is_safe = false; 
    58    
     58 
    5959 
    6060    /** 
     
    106106        $this->app->plugins->exec_hook('message_load', array('object' => $this)); 
    107107    } 
    108    
    109    
     108 
     109 
    110110    /** 
    111111     * Return a (decoded) message header 
     
    125125    } 
    126126 
    127    
     127 
    128128    /** 
    129129     * Set is_safe var and session data 
     
    469469                        $this->parse_structure($mail_part, true); 
    470470                    } 
    471                     // is a regular attachment 
    472                     else if (preg_match('!^[a-z0-9-.+_]+/[a-z0-9-.+_]+$!i', $part_mimetype)) { 
     471                    // is a regular attachment (content-type name regexp according to RFC4288.4.2) 
     472                    else if (preg_match('/^[a-z0-9!#$&.+^_-]+\/[a-z0-9!#$&.+^_-]+$/i', $part_mimetype)) { 
    473473                        if (!$mail_part->filename) 
    474474                            $mail_part->filename = 'Part '.$mail_part->mime_id; 
Note: See TracChangeset for help on using the changeset viewer.