Changeset 9bb1fc7 in github


Ignore:
Timestamp:
Jul 6, 2010 6:38:58 AM (3 years ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
5019d9c
Parents:
7534f6f
Message:
  • Make sure attachment name doesn't contain \r\n (#1486832)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • program/steps/mail/get.inc

    rb25dfd0 r9bb1fc7  
    5656    $ctype_secondary = strtolower($part->ctype_secondary); 
    5757    $mimetype = sprintf('%s/%s', $ctype_primary, $ctype_secondary); 
    58      
     58 
    5959    $browser = new rcube_browser; 
    6060 
     
    8585      // don't kill the connection if download takes more than 30 sec. 
    8686      @set_time_limit(0); 
    87        
     87 
    8888      $filename = $part->filename ? $part->filename : ($MESSAGE->subject ? $MESSAGE->subject : 'roundcube') . '.'.$ctype_secondary; 
    89        
     89      $filename = preg_replace('[\r\n]', '', $filename); 
     90 
    9091      if ($browser->ie && $browser->ver < 7) 
    9192        $filename = rawurlencode(abbreviate_string($filename, 55)); 
     
    9495      else 
    9596        $filename = addcslashes($filename, '"'); 
    96        
     97 
    9798      $disposition = !empty($_GET['_download']) ? 'attachment' : 'inline'; 
    98        
     99 
    99100      header("Content-Disposition: $disposition; filename=\"$filename\""); 
    100        
     101 
    101102      // turn off output buffering and print part content 
    102103      if ($part->body) 
Note: See TracChangeset for help on using the changeset viewer.