Changeset 3cf6649 in github


Ignore:
Timestamp:
Mar 21, 2007 5:56:49 AM (6 years ago)
Author:
thomascube <thomas@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
5181405
Parents:
ab6f807
Message:

Minor bugfixes posted to the dev-mailing list

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    r5cc4b13 r3cf6649  
    11CHANGELOG RoundCube Webmail 
    22--------------------------- 
     3 
     42007/03/21 (thomasb) 
     5---------- 
     6- Updated PEAR::Mail_mime package 
     7- Added Persian localization 
     8- Updated Catalan and Brazilian Portuguese translations 
     9- Updated INSTALL manual with a note about database passwords 
     10- Accept single quotes for HTML attributes when modifying message body (thanks Jason) 
     11- Sanitize input for new users/identities (thanks Colin Alston) 
     12 
    313 
    4142007/03/19 (thomasb) 
  • INSTALL

    rf7bfec9 r3cf6649  
    6161# mysql roundcubemail < SQL/mysql5.initial.sql 
    6262 
     63Note: 'password' is the master password for the roundcube user. It is strongly 
     64recommended you replace this with a more secure password. Please keep in 
     65mind: You need to specify this password later in 'config/db.inc.php'. 
     66 
    6367 
    6468* SQLite 
  • program/include/main.inc

    r86958f7 r3cf6649  
    581581              (created, last_login, username, mail_host, alias, language) 
    582582              VALUES (".$DB->now().", ".$DB->now().", ?, ?, ?, ?)", 
    583               $user, 
    584               $host, 
    585               $user_email, 
    586                       $_SESSION['user_lang']); 
     583              strip_newlines($user), 
     584              strip_newlines($host), 
     585              strip_newlines($user_email), 
     586              $_SESSION['user_lang']); 
    587587 
    588588  if ($user_id = $DB->insert_id(get_sequence_name('users'))) 
     
    596596 
    597597    // try to resolve the e-mail address from the virtuser table 
    598         if (!empty($CONFIG['virtuser_query']) && 
     598    if (!empty($CONFIG['virtuser_query']) && 
    599599        ($sql_result = $DB->query(preg_replace('/%u/', $user, $CONFIG['virtuser_query']))) && 
    600600        ($DB->num_rows()>0)) 
     
    605605                   VALUES (?, 0, 1, ?, ?)", 
    606606                   $user_id, 
    607                    $user_name, 
     607                   strip_newlines($user_name), 
    608608                   preg_replace('/^@/', $user . '@', $sql_arr[0])); 
    609609        } 
     
    615615                  VALUES (?, 0, 1, ?, ?)", 
    616616                  $user_id, 
    617                   $user_name, 
    618                   $user_email); 
     617                  strip_newlines($user_name), 
     618                  strip_newlines($user_email)); 
    619619      } 
    620620                        
     
    11391139{ 
    11401140  return preg_replace('/[\'"]/', '', $str); 
     1141} 
     1142 
     1143/** 
     1144 * Remove new lines characters from given string 
     1145 */ 
     1146function strip_newlines($str) 
     1147{ 
     1148  return preg_replace('/[\r\n]/', '', $str); 
    11411149} 
    11421150 
  • program/include/rcube_imap.inc

    r5cc4b13 r3cf6649  
    21182118      $address = $val['address']; 
    21192119      $name = preg_replace(array('/^[\'"]/', '/[\'"]$/'), '', trim($val['name'])); 
    2120       $string = $name!==$address ? sprintf('%s <%s>', strpos($name, ',')!==FALSE ? '"'.$name.'"' : $name, $address) : $address; 
     2120      if ($name && $address && $name != $address) 
     2121        $string = sprintf('%s <%s>', strpos($name, ',')!==FALSE ? '"'.$name.'"' : $name, $address); 
     2122      else if ($address) 
     2123        $string = $address; 
     2124      else if ($name) 
     2125        $string = $name; 
    21212126       
    21222127      $out[$j] = array('name' => $name, 
     
    24772482      foreach ($sub_a as $k => $v) 
    24782483        { 
    2479         if ((strpos($v, '@') > 0) && (strpos($v, '.') > 0))  
     2484        if (strpos($v, '@') > 0) 
    24802485          $result[$key]['address'] = str_replace('<', '', str_replace('>', '', $v)); 
    24812486        else 
  • program/steps/mail/compose.inc

    r5cc4b13 r3cf6649  
    202202      foreach ($to_addresses as $addr_part) 
    203203        { 
    204         if (!in_array($addr_part['mailto'], $sa_recipients) && (!$MESSAGE['FROM'] || !in_array($addr_part['mailto'], $MESSAGE['FROM']))) 
     204        if (!empty($addr_part['mailto']) && !in_array($addr_part['mailto'], $sa_recipients) && (!$MESSAGE['FROM'] || !in_array($addr_part['mailto'], $MESSAGE['FROM']))) 
    205205          { 
    206206          $fvalue .= (strlen($fvalue) ? ', ':'').$addr_part['string']; 
     
    385385      $isHtml = false; 
    386386      } 
    387     if (strlen($body)) 
    388       $body = rcmail_create_reply_body($body, $isHtml); 
     387 
     388    $body = rcmail_create_reply_body($body, $isHtml); 
    389389    } 
    390390  // forward message body inline 
     
    418418      $isHtml = false; 
    419419      } 
    420     if (strlen($body)) 
    421       $body = rcmail_create_draft_body($body, $isHtml); 
     420 
     421    $body = rcmail_create_draft_body($body, $isHtml); 
    422422    } 
    423423 
  • program/steps/mail/func.inc

    r5cc4b13 r3cf6649  
    12531253function rcmail_alter_html_link($in) 
    12541254  { 
    1255   $in = preg_replace('/=([^("|\s)]+)(\s|$)/', '="\1"', $in); 
     1255  $in = preg_replace('/=([^("|\'|\s)]+)(\s|$)/', '="\1"', $in); 
    12561256  $attrib = parse_attrib_string($in); 
    12571257 
Note: See TracChangeset for help on using the changeset viewer.