Changeset ee883ad in github


Ignore:
Timestamp:
Dec 22, 2006 4:45:21 PM (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:
822e276
Parents:
8af7757
Message:

Applied security patches by Kees Cook (Ubuntu) + little visual enhancements

Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    r04c6180 ree883ad  
    11CHANGELOG RoundCube Webmail 
    22--------------------------- 
     3 
     42006/12/22 (thomasb) 
     5---------- 
     6- Applied security patch to validate the submitted host value (by Kees Cook) 
     7- Applied security patch to validate input values when deleting contacts (by Kees Cook) 
     8- Applied security patch that sanitizes emoticon paths when attaching them (by Kees Cook) 
     9- Applied a patch to more aggressively sanitize a HTML message 
     10- Visualize blocked images in HTML messages 
     11 
    312 
    4132006/12/20 (thomasb) 
  • program/include/main.inc

    r8c8b2a4 ree883ad  
    450450  if (!$host) 
    451451    $host = $CONFIG['default_host']; 
     452 
     453  // Validate that selected host is in the list of configured hosts 
     454  if (is_array($CONFIG['default_host'])) 
     455    { 
     456    $allowed = FALSE; 
     457    foreach ($CONFIG['default_host'] as $key => $host_allowed) 
     458      { 
     459      if (!is_numeric($key)) 
     460        $host_allowed = $key; 
     461      if ($host == $host_allowed) 
     462        { 
     463        $allowed = TRUE; 
     464        break; 
     465        } 
     466      } 
     467    if (!$allowed) 
     468      return FALSE; 
     469    } 
     470  else if (!empty($CONFIG['default_host']) && $host != $CONFIG['default_host']) 
     471    return FALSE; 
    452472 
    453473  // parse $host URL 
  • program/steps/addressbook/delete.inc

    r1cded85 ree883ad  
    2222$REMOTE_REQUEST = TRUE; 
    2323 
    24 if ($_GET['_cid']) 
     24if ($_GET['_cid'] && preg_match('/^[0-9]+(,[0-9]+)*$/',$_GET['_cid'])) 
    2525  { 
    2626  $DB->query("UPDATE ".get_table_name('contacts')." 
  • program/steps/mail/func.inc

    r2bca6e1 ree883ad  
    740740                               '/<script.+<\/script>/Umis'); 
    741741 
    742       $remote_replaces = array('<img \\1src=\\2./program/blank.gif\\4', 
     742      $remote_replaces = array('<img \\1src=\\2./program/blocked.gif\\4', 
    743743                               '', 
    744744                               '', 
     
    12111211 
    12121212  // replace event handlers on any object 
    1213   $body = preg_replace('/\s(on[a-z]+)=/im', ' __removed=', $body);   
     1213  $body = preg_replace('/\s(on[^=]+)=/im', ' __removed=', $body);   
     1214  $body = preg_replace('/\shref=["\']?(javascript:)/im', 'null:', $body); 
    12141215 
    12151216  // resolve <base href> 
     
    12521253    $attrib['onclick'] = sprintf("return %s.command('compose','%s',this)", 
    12531254                                 $GLOBALS['JS_OBJECT_NAME'], 
    1254                                  substr($attrib['href'], 7)); 
     1255                                 JQ(substr($attrib['href'], 7))); 
    12551256  else if (!empty($attrib['href']) && $attrib['href']{0}!='#') 
    12561257    $attrib['target'] = '_blank'; 
  • program/steps/mail/sendmail.inc

    r2bca6e1 ree883ad  
    101101                         $pos + strlen($searchstr), 
    102102                         $pos2 - ($pos + strlen($searchstr))); 
     103    // sanitize image name so resulting attachment doesn't leave images dir 
     104    $image_name = preg_replace('/[^a-zA-Z0-9_\.\-]/i','',$image_name); 
    103105 
    104106    $body_post = substr($body, $pos2); 
  • program/steps/settings/delete_identity.inc

    r1cded85 ree883ad  
    2222$REMOTE_REQUEST = $_GET['_remote'] ? TRUE : FALSE; 
    2323 
    24 if ($_GET['_iid']) 
     24if ($_GET['_iid'] && preg_match('/^[0-9]+(,[0-9]+)*$/',$_GET['_iid'])) 
    2525  { 
    2626  $DB->query("UPDATE ".get_table_name('identities')." 
  • skins/default/mail.css

    ra7d5c648 ree883ad  
    153153#messagepartframe 
    154154{ 
     155  position: absolute; 
     156  top: 0px; 
     157  left: 0px; 
     158  right: 0px; 
     159  bottom: 0px; 
     160  width: auto; 
     161  height: auto; 
    155162  border: 1px solid #999999; 
    156   background-color: #F9F9F9;   
     163  background-color: #F9F9F9; 
    157164} 
    158165 
Note: See TracChangeset for help on using the changeset viewer.