Changeset b46e5b74 in github


Ignore:
Timestamp:
Feb 9, 2011 5:51:50 AM (2 years ago)
Author:
thomascube <thomas@…>
Children:
dcc7900
Parents:
98cb0f1
Message:

Apply more bugfixes from trunk for 0.5.1

Files:
30 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    r98cb0f1 rb46e5b74  
    44RELEASE 0.5.1 
    55------------- 
     6- Security: add optional referer check to prevent CSRF in GET requests 
     7- Fix email_dns_check setting not used for identities/contacts (#1487740) 
     8- Fix ICANN example addresses doesn't validate (#1487742) 
     9- Security: protect login form submission from CSRF 
     10- Security: prevent from relaying malicious requests through modcss.inc 
     11- Fix handling of non-image attachments in multipart/related messages (#1487750) 
     12- Fix IDNA support when IDN/INTL modules are in use (#1487742) 
     13- Fix handling of invalid HTML comments in messages (#1487759) 
     14- Fix parsing FETCH response for very long headers (#1487753) 
     15- Fix add/remove columns in message list when message_sort_order isn't set (#1487751) 
    616- Fix settings UI on IE 6 (#1487724) 
    717- Remove double borders in folder listing (#1487713) 
  • config/main.inc.php.dist

    r00e18b7 rb46e5b74  
    213213// There have been problems reported with this feature. 
    214214$rcmail_config['double_auth'] = false; 
     215 
     216// check referer of incoming requests 
     217$rcmail_config['referer_check'] = false; 
    215218 
    216219// this key is used to encrypt the users imap password which is stored 
  • index.php

    r98cb0f1 rb46e5b74  
    7676// try to log in 
    7777if ($RCMAIL->task == 'login' && $RCMAIL->action == 'login') { 
     78  $request_valid = $_SESSION['temp'] && $RCMAIL->check_request(RCUBE_INPUT_POST, 'login'); 
     79 
    7880  // purge the session in case of new login when a session already exists  
    7981  $RCMAIL->kill_session(); 
     
    8587       $RCMAIL->config->get('password_charset', 'ISO-8859-1')), 
    8688    'cookiecheck' => true, 
     89    'valid' => $request_valid, 
    8790  )); 
    8891 
     
    9194    $OUTPUT->show_message("cookiesdisabled", 'warning'); 
    9295  } 
    93   else if ($_SESSION['temp'] && !$auth['abort'] && 
     96  else if ($auth['valid'] && !$auth['abort'] && 
    9497        !empty($auth['host']) && !empty($auth['user']) && 
    9598        $RCMAIL->login($auth['user'], $auth['pass'], $auth['host'])) { 
     
    124127    $error_code = is_object($IMAP) ? $IMAP->get_error_code() : -1; 
    125128 
    126     $OUTPUT->show_message($error_code < -1 ? 'imaperror' : 'loginfailed', 'warning'); 
     129    $OUTPUT->show_message($error_code < -1 ? 'imaperror' : (!$auth['valid'] ? 'invalidrequest' : 'loginfailed'), 'warning'); 
    127130    $RCMAIL->plugins->exec_hook('login_failed', array( 
    128131      'code' => $error_code, 'host' => $auth['host'], 'user' => $auth['user'])); 
     
    131134} 
    132135 
    133 // end session 
    134 else if ($RCMAIL->task == 'logout' && isset($_SESSION['user_id'])) { 
     136// end session (after optional referer check) 
     137else if ($RCMAIL->task == 'logout' && isset($_SESSION['user_id']) && (!$RCMAIL->config->get('referer_check') || rcube_check_referer())) { 
    135138  $userdata = array('user' => $_SESSION['username'], 'host' => $_SESSION['imap_host'], 'lang' => $RCMAIL->user->language); 
    136139  $OUTPUT->show_message('loggedout'); 
     
    168171  } 
    169172 
    170   $OUTPUT->set_env('task', 'login'); 
     173  $RCMAIL->set_task('login'); 
    171174  $OUTPUT->send('login'); 
    172175} 
     
    187190    $OUTPUT->show_message('invalidrequest', 'error'); 
    188191    $OUTPUT->send($RCMAIL->task); 
     192  } 
     193 
     194  // check referer if configured 
     195  if (!$request_check_whitelist[$RCMAIL->action] && $RCMAIL->config->get('referer_check') && !rcube_check_referer()) { 
     196    raise_error(array( 
     197      'code' => 403, 
     198      'type' => 'php', 
     199      'message' => "Referer check failed"), true, true); 
    189200  } 
    190201} 
  • program/include/main.inc

    r98cb0f1 rb46e5b74  
    12251225 
    12261226/** 
     1227 * Check whether the HTTP referer matches the current request 
     1228 * 
     1229 * @return boolean True if referer is the same host+path, false if not 
     1230 */ 
     1231function rcube_check_referer() 
     1232{ 
     1233  $uri = parse_url($_SERVER['REQUEST_URI']); 
     1234  $referer = parse_url(rc_request_header('Referer')); 
     1235  return $referer['host'] == rc_request_header('Host') && $referer['path'] == $uri['path']; 
     1236} 
     1237 
     1238 
     1239/** 
    12271240 * @access private 
    12281241 * @return mixed 
     
    18641877} 
    18651878 
     1879/* 
     1880 * Idn_to_ascii wrapper. 
     1881 * Intl/Idn modules version of this function doesn't work with e-mail address 
     1882 */ 
     1883function rcube_idn_to_ascii($str) 
     1884{ 
     1885  return rcube_idn_convert($str, true); 
     1886} 
     1887 
     1888/* 
     1889 * Idn_to_ascii wrapper. 
     1890 * Intl/Idn modules version of this function doesn't work with e-mail address 
     1891 */ 
     1892function rcube_idn_to_utf8($str) 
     1893{ 
     1894  return rcube_idn_convert($str, false); 
     1895} 
     1896 
     1897function rcube_idn_convert($input, $is_utf=false) 
     1898{ 
     1899  if ($at = strpos($input, '@')) { 
     1900    $user   = substr($input, 0, $at); 
     1901    $domain = substr($input, $at+1); 
     1902  } 
     1903  else { 
     1904    $domain = $input; 
     1905  } 
     1906 
     1907  $domain = $is_utf ? idn_to_ascii($domain) : idn_to_utf8($domain); 
     1908 
     1909  return $at ? $user . '@' . $domain : $domain; 
     1910} 
     1911 
    18661912 
    18671913/** 
  • program/include/rcmail.php

    r98cb0f1 rb46e5b74  
    692692    // Here we need IDNA ASCII 
    693693    // Only rcube_contacts class is using domain names in Unicode 
    694     $host = idn_to_ascii($host); 
     694    $host = rcube_idn_to_ascii($host); 
    695695    if (strpos($username, '@')) { 
    696696      // lowercase domain name 
    697697      list($local, $domain) = explode('@', $username); 
    698698      $username = $local . '@' . mb_strtolower($domain); 
    699       $username = idn_to_ascii($username); 
     699      $username = rcube_idn_to_ascii($username); 
    700700    } 
    701701 
  • program/include/rcube_config.php

    r7c9850d rb46e5b74  
    288288 
    289289        if ($encode) 
    290             $domain = idn_to_ascii($domain); 
     290            $domain = rcube_idn_to_ascii($domain); 
    291291 
    292292        return $domain; 
  • program/include/rcube_imap_generic.php

    r808d161 rb46e5b74  
    14951495                // BODY[HEADER.FIELDS ... 
    14961496 
    1497                 if (preg_match('/^\* [0-9]+ FETCH \((.*) BODY/s', $line, $matches)) { 
     1497                if (preg_match('/^\* [0-9]+ FETCH \((.*) BODY/sU', $line, $matches)) { 
    14981498                    $str = $matches[1]; 
    14991499 
     
    15321532                    // BODYSTRUCTURE 
    15331533                    if ($bodystr) { 
    1534                         while (!preg_match('/ BODYSTRUCTURE (.*) BODY\[HEADER.FIELDS/s', $line, $m)) { 
     1534                        while (!preg_match('/ BODYSTRUCTURE (.*) BODY\[HEADER.FIELDS/sU', $line, $m)) { 
    15351535                            $line2 = $this->readLine(1024); 
    15361536                            $line .= $this->multLine($line2, true); 
     
    16321632                        case 'content-type': 
    16331633                            $ctype_parts = preg_split('/[; ]/', $string); 
    1634                             $result[$id]->ctype = array_shift($ctype_parts); 
     1634                            $result[$id]->ctype = strtolower(array_shift($ctype_parts)); 
    16351635                            if (preg_match('/charset\s*=\s*"?([a-z0-9\-\.\_]+)"?/i', $string, $regs)) { 
    16361636                                $result[$id]->charset = $regs[1]; 
  • program/include/rcube_ldap.php

    r1148c6e rb46e5b74  
    100100    foreach ($this->prop['hosts'] as $host) 
    101101    { 
    102       $host = idn_to_ascii(rcube_parse_host($host)); 
     102      $host = rcube_idn_to_ascii(rcube_parse_host($host)); 
    103103      $this->_debug("C: Connect [$host".($this->prop['port'] ? ':'.$this->prop['port'] : '')."]"); 
    104104 
  • program/include/rcube_message.php

    rfd371a51 rb46e5b74  
    507507                        $this->attachments[] = $inline_object; 
    508508                    } 
     509                    // MS Outlook sometimes also adds non-image attachments as related 
     510                    // We'll add all such attachments to the attachments list 
     511                    // Warning: some browsers support pdf in <img/> 
     512                    // @TODO: we should fetch HTML body and find attachment's content-id 
     513                    // to handle also image attachments without reference in the body 
     514                    if (!empty($inline_object->filename) 
     515                        && !preg_match('/^image\/(gif|jpe?g|png|tiff|bmp|svg)/', $inline_object->mimetype) 
     516                    ) { 
     517                        $this->attachments[] = $inline_object; 
     518                    } 
    509519                } 
    510520 
  • program/include/rcube_session.php

    reee6944 rb46e5b74  
    155155      $key); 
    156156 
     157    if ($key == $this->key) 
     158        $this->vars = false; 
    157159    return true; 
    158160  } 
  • program/include/rcube_shared.inc

    r0f9d8ca rb46e5b74  
    701701        } 
    702702 
    703         if ($idn && $domain && preg_match('/(^|@|\.)xn--/i', $domain)) { 
     703        if ($idn && $domain && preg_match('/(^|\.)xn--/i', $domain)) { 
    704704            try { 
    705705                $domain = $idn->decode($domain); 
  • program/include/rcube_smtp.php

    r63d4d611 rb46e5b74  
    102102 
    103103    // IDNA Support 
    104     $smtp_host = idn_to_ascii($smtp_host); 
     104    $smtp_host = rcube_idn_to_ascii($smtp_host); 
    105105 
    106106    $this->conn = new Net_SMTP($smtp_host, $smtp_port, $helo_host); 
     
    133133    { 
    134134      // IDNA Support 
    135       if (strpos($smtp_user, '@')) 
    136         $smtp_user = idn_to_ascii($smtp_user); 
     135      if (strpos($smtp_user, '@')) { 
     136        $smtp_user = rcube_idn_to_ascii($smtp_user); 
     137      } 
    137138 
    138139      $result = $this->conn->auth($smtp_user, $smtp_pass, $smtp_auth_type, $use_tls, $smtp_authz); 
  • program/include/rcube_template.php

    r98cb0f1 rb46e5b74  
    10321032        } 
    10331033 
    1034         return idn_to_utf8($username); 
     1034        return rcube_idn_to_utf8($username); 
    10351035    } 
    10361036 
  • program/js/common.js

    r6f09681 rb46e5b74  
    494494      //domain_literal = '\\x5b('+dtext+'|'+quoted_pair+')*\\x5d', 
    495495      //sub_domain = '('+atom+'|'+domain_literal+')', 
    496       domain = '([^@\\x2e]+\\x2e)+[a-z]{2,}', 
     496      // allow punycode in last domain part for ICANN test domains 
     497      domain = '([^@\\x2e]+\\x2e)+([a-z]{2,}|xn--[a-z0-9]{2,})', 
     498      // ICANN e-mail test (http://idn.icann.org/E-mail_test) 
     499      icann_domains = [ 
     500        '\\u0645\\u062b\\u0627\\u0644\\x2e\\u0625\\u062e\\u062a\\u0628\\u0627\\u0631', 
     501        '\\u4f8b\\u5b50\\x2e\\u6d4b\\u8bd5', 
     502        '\\u4f8b\\u5b50\\x2e\\u6e2c\\u8a66', 
     503        '\\u03c0\\u03b1\\u03c1\\u03ac\\u03b4\\u03b5\\u03b9\\u03b3\\u03bc\\u03b1\\x2e\\u03b4\\u03bf\\u03ba\\u03b9\\u03bc\\u03ae', 
     504        '\\u0909\\u0926\\u093e\\u0939\\u0930\\u0923\\x2e\\u092a\\u0930\\u0940\\u0915\\u094d\\u0937\\u093e', 
     505        '\\u4f8b\\u3048\\x2e\\u30c6\\u30b9\\u30c8', 
     506        '\\uc2e4\\ub840\\x2e\\ud14c\\uc2a4\\ud2b8', 
     507        '\\u0645\\u062b\\u0627\\u0644\\x2e\\u0622\\u0632\\u0645\\u0627\\u06cc\\u0634\u06cc', 
     508        '\\u043f\\u0440\\u0438\\u043c\\u0435\\u0440\\x2e\\u0438\\u0441\\u043f\\u044b\\u0442\\u0430\\u043d\\u0438\\u0435', 
     509        '\\u0b89\\u0ba4\\u0bbe\\u0bb0\\u0ba3\\u0bae\\u0bcd\\x2e\\u0baa\\u0bb0\\u0bbf\\u0b9f\\u0bcd\\u0b9a\\u0bc8', 
     510        '\\u05d1\\u05f2\\u05b7\\u05e9\\u05e4\\u05bc\\u05d9\\u05dc\\x2e\\u05d8\\u05e2\\u05e1\\u05d8' 
     511      ], 
     512      icann_addr = 'mailtest\\x40('+icann_domains.join('|')+')', 
    497513      word = '('+atom+'|'+quoted_string+')', 
    498514      delim = '[,;\s\n]', 
    499515      local_part = word+'(\\x2e'+word+')*', 
    500       addr_spec = local_part+'\\x40'+domain, 
     516      addr_spec = '(('+local_part+'\\x40'+domain+')|('+icann_addr+'))', 
    501517      reg1 = inline ? new RegExp('(^|<|'+delim+')'+addr_spec+'($|>|'+delim+')', 'i') : new RegExp('^'+addr_spec+'$', 'i'); 
    502518 
  • program/lib/washtml.php

    r4d268b1 rb46e5b74  
    7676 * - added RFC2397 support 
    7777 * - base URL support 
     78 * - invalid HTML comments removal before parsing 
    7879 */ 
    7980 
     
    272273      $this->config['base_url'] = ''; 
    273274 
     275    // Remove invalid HTML comments (#1487759) 
     276    $html = preg_replace('/<![^>]*>/', '', $html); 
     277 
    274278    @$node->loadHTML($html); 
    275279    return $this->dumpHtml($node); 
  • program/localization/de_DE/labels.inc

    r98cb0f1 rb46e5b74  
    198198$labels['addreplyto'] = 'Antwortadresse hinzufÃŒgen'; 
    199199$labels['addfollowupto'] = 'Followup-To hinzufÃŒgen'; 
    200 $labels['mdnrequest'] = 'Der Sender dieser Nachricht möchte gerne eine LesebestÀtigung. Wollen Sie dieses bestÀtigen?'; 
     200$labels['mdnrequest'] = 'Der Sender dieser Nachricht möchte gerne eine EmpfangsbestÀtigung. Wollen Sie dieses bestÀtigen?'; 
    201201$labels['receiptread'] = 'EmpfangsbestÀtigung (gelesen)'; 
    202202$labels['yourmessage'] = 'Dies ist eine EmpfangsbestÀtigung fÃŒr Ihre Nachricht'; 
     
    298298$labels['mdnrequests'] = 'EmpfangsbestÀtigung senden'; 
    299299$labels['askuser'] = 'immer fragen'; 
    300 $labels['autosend'] = 'LesebestÀtigung automatisch senden'; 
    301 $labels['autosendknown'] = 'LesebestÀtigung nur an meine Kontakte senden'; 
     300$labels['autosend'] = 'automatisch senden'; 
     301$labels['autosendknown'] = 'nur an meine Kontakte senden'; 
    302302$labels['autosendknownignore'] = 'fÃŒr bekannte Absender, sonst ignorieren'; 
    303303$labels['ignore'] = 'ignorieren'; 
  • program/steps/addressbook/import.inc

    r135f84a rb46e5b74  
    137137 
    138138      // We're using UTF8 internally 
    139       $email = idn_to_utf8($email); 
     139      $email = rcube_idn_to_utf8($email); 
    140140       
    141141      if (!$replace) { 
  • program/steps/addressbook/save.inc

    r98cb0f1 rb46e5b74  
    5050 
    5151// Validity checks 
    52 $_email = idn_to_ascii($a_record['email']); 
    53 if (!check_email($_email, false)) { 
     52$_email = rcube_idn_to_ascii($a_record['email']); 
     53if (!check_email($_email)) { 
    5454  $OUTPUT->show_message('emailformaterror', 'warning', array('email' => $_email)); 
    5555  rcmail_overwrite_action($return_action); 
  • program/steps/mail/addcontact.inc

    r6f09681 rb46e5b74  
    4747    } 
    4848 
    49     $contact['email'] = idn_to_utf8($contact['email']); 
     49    $contact['email'] = rcube_idn_to_utf8($contact['email']); 
    5050 
    5151    // use email address part for name 
  • program/steps/mail/compose.inc

    r3ee5a72 rb46e5b74  
    322322          continue; 
    323323 
    324         $mailto = idn_to_utf8($addr_part['mailto']); 
     324        $mailto = rcube_idn_to_utf8($addr_part['mailto']); 
    325325 
    326326        if (!in_array($mailto, $sa_recipients) 
     
    361361        continue; 
    362362 
    363       $mailto = idn_to_utf8($addr_part['mailto']); 
     363      $mailto = rcube_idn_to_utf8($addr_part['mailto']); 
    364364 
    365365      if ($addr_part['name'] && $addr_part['mailto'] != $addr_part['name']) 
     
    438438    foreach ($user_identities as $sql_arr) 
    439439    { 
    440       $email = mb_strtolower(idn_to_utf8($sql_arr['email'])); 
     440      $email = mb_strtolower(rcube_idn_to_utf8($sql_arr['email'])); 
    441441      $identity_id = $sql_arr['identity_id']; 
    442442      $select_from->add(format_email_recipient($email, $sql_arr['name']), $identity_id); 
     
    733733 
    734734  // build reply prefix 
    735   $from = array_pop($RCMAIL->imap->decode_address_list($MESSAGE->get_header('from'))); 
     735  $from = array_pop($RCMAIL->imap->decode_address_list($MESSAGE->get_header('from'), 1, false)); 
    736736  $prefix = sprintf("On %s, %s wrote:", 
    737     $MESSAGE->headers->date, $from['name'] ? $from['name'] : idn_to_utf8($from['mailto'])); 
     737    $MESSAGE->headers->date, $from['name'] ? $from['name'] : rcube_idn_to_utf8($from['mailto'])); 
    738738 
    739739  if (!$bodyIsHtml) { 
  • program/steps/mail/func.inc

    r98cb0f1 rb46e5b74  
    5757// set default sort col/order to session 
    5858if (!isset($_SESSION['sort_col'])) 
    59   $_SESSION['sort_col'] = $CONFIG['message_sort_col']; 
     59  $_SESSION['sort_col'] = !empty($CONFIG['message_sort_col']) ? $CONFIG['message_sort_col'] : ''; 
    6060if (!isset($_SESSION['sort_order'])) 
    61   $_SESSION['sort_order'] = $CONFIG['message_sort_order']; 
     61  $_SESSION['sort_order'] = strtoupper($CONFIG['message_sort_order']) == 'ASC' ? 'ASC' : 'DESC'; 
    6262 
    6363// set threads mode 
     
    11951195function rcmail_alter_html_link($matches) 
    11961196{ 
    1197   global $EMAIL_ADDRESS_PATTERN; 
     1197  global $RCMAIL, $EMAIL_ADDRESS_PATTERN; 
    11981198 
    11991199  $tag = $matches[1]; 
     
    12021202 
    12031203  if ($tag == 'link' && preg_match('/^https?:\/\//i', $attrib['href'])) { 
    1204     $attrib['href'] = "?_task=utils&amp;_action=modcss&amp;u=" . urlencode($attrib['href']) 
    1205         . "&amp;c=" . urlencode($GLOBALS['rcmail_html_container_id']); 
     1204    $tempurl = 'tmp-' . md5($attrib['href']) . '.css'; 
     1205    $_SESSION['modcssurls'][$tempurl] = $attrib['href']; 
     1206    $attrib['href'] = $RCMAIL->url(array('task' => 'utils', 'action' => 'modcss', 'u' => $tempurl, 'c' => $GLOBALS['rcmail_html_container_id'])); 
    12061207    $end = ' />'; 
    12071208  } 
     
    12511252    // IDNA ASCII to Unicode 
    12521253    if ($name == $mailto) 
    1253       $name = idn_to_utf8($name); 
     1254      $name = rcube_idn_to_utf8($name); 
    12541255    if ($string == $mailto) 
    1255       $string = idn_to_utf8($string); 
    1256     $mailto = idn_to_utf8($mailto); 
     1256      $string = rcube_idn_to_utf8($string); 
     1257    $mailto = rcube_idn_to_utf8($mailto); 
    12571258 
    12581259    if ($PRINT_MODE) { 
  • program/steps/mail/sendmail.inc

    r56849c6 rb46e5b74  
    154154    // address in brackets without name (do nothing) 
    155155    if (preg_match('/^<\S+@\S+>$/', $item)) { 
    156       $item = idn_to_ascii($item); 
     156      $item = rcube_idn_to_ascii($item); 
    157157      $result[] = $item; 
    158158    // address without brackets and without name (add brackets) 
    159159    } else if (preg_match('/^\S+@\S+$/', $item)) { 
    160       $item = idn_to_ascii($item); 
     160      $item = rcube_idn_to_ascii($item); 
    161161      $result[] = '<'.$item.'>'; 
    162162    // address with name (handle name) 
     
    169169            $name = '"'.addcslashes($name, '"').'"'; 
    170170      } 
    171       $address = idn_to_ascii($address); 
     171      $address = rcube_idn_to_ascii($address); 
    172172      if (!preg_match('/^<\S+@\S+>$/', $address)) 
    173173        $address = '<'.$address.'>'; 
  • program/steps/settings/edit_identity.inc

    r3ee5a72 rb46e5b74  
    9595  } 
    9696 
    97   $IDENTITY_RECORD['email']    = idn_to_utf8($IDENTITY_RECORD['email']); 
    98   $IDENTITY_RECORD['reply-to'] = idn_to_utf8($IDENTITY_RECORD['reply-to']); 
    99   $IDENTITY_RECORD['bcc']      = idn_to_utf8($IDENTITY_RECORD['bcc']); 
     97  $IDENTITY_RECORD['email']    = rcube_idn_to_utf8($IDENTITY_RECORD['email']); 
     98  $IDENTITY_RECORD['reply-to'] = rcube_idn_to_utf8($IDENTITY_RECORD['reply-to']); 
     99  $IDENTITY_RECORD['bcc']      = rcube_idn_to_utf8($IDENTITY_RECORD['bcc']); 
    100100 
    101101  // Allow plugins to modify identity form content 
  • program/steps/settings/func.inc

    r98cb0f1 rb46e5b74  
    7373  $list = $USER->list_identities(); 
    7474  foreach ($list as $idx => $row) 
    75     $list[$idx]['mail'] = trim($row['name'] . ' <' . idn_to_utf8($row['email']) .'>'); 
     75    $list[$idx]['mail'] = trim($row['name'] . ' <' . rcube_idn_to_utf8($row['email']) .'>'); 
    7676 
    7777  // get all identites from DB and define list of cols to be displayed 
  • program/steps/settings/save_identity.inc

    rce92ba7 rb46e5b74  
    6060foreach (array('email', 'reply-to', 'bcc') as $item) { 
    6161  if ($email = $save_data[$item]) { 
    62     $ascii_email = idn_to_ascii($email); 
    63     if (!check_email($ascii_email, false)) { 
     62    $ascii_email = rcube_idn_to_ascii($email); 
     63    if (!check_email($ascii_email)) { 
    6464      // show error message 
    6565      $OUTPUT->show_message('emailformaterror', 'error', array('email' => $email), false); 
     
    7878 
    7979  if ($save_data['email']) 
    80     $save_data['email'] = idn_to_ascii($save_data['email']); 
     80    $save_data['email'] = rcube_idn_to_ascii($save_data['email']); 
    8181  if ($save_data['bcc']) 
    82     $save_data['bcc'] = idn_to_ascii($save_data['bcc']); 
     82    $save_data['bcc'] = rcube_idn_to_ascii($save_data['bcc']); 
    8383  if ($save_data['reply-to']) 
    84     $save_data['reply-to'] = idn_to_ascii($save_data['reply-to']); 
     84    $save_data['reply-to'] = rcube_idn_to_ascii($save_data['reply-to']); 
    8585 
    8686  if (!$plugin['abort']) 
     
    117117  $save_data = $plugin['record']; 
    118118 
    119   $save_data['email']    = idn_to_ascii($save_data['email']); 
    120   $save_data['bcc']      = idn_to_ascii($save_data['bcc']); 
    121   $save_data['reply-to'] = idn_to_ascii($save_data['reply-to']); 
     119  $save_data['email']    = rcube_idn_to_ascii($save_data['email']); 
     120  $save_data['bcc']      = rcube_idn_to_ascii($save_data['bcc']); 
     121  $save_data['reply-to'] = rcube_idn_to_ascii($save_data['reply-to']); 
    122122 
    123123  if (!$plugin['abort']) 
  • program/steps/utils/error.inc

    re019f2d rb46e5b74  
    4545  $__error_title = "AUTHORIZATION FAILED"; 
    4646  $__error_text  = "Could not verify that you are authorized to access this service!<br />\n". 
     47                   "Please contact your server-administrator."; 
     48} 
     49 
     50// forbidden due to request check 
     51else if ($ERROR_CODE==403) { 
     52  $__error_title = "REQUEST CHECK FAILED"; 
     53  $__error_text  = "Access to this service was denied due to failing security checks!<br />\n". 
    4754                   "Please contact your server-administrator."; 
    4855} 
  • program/steps/utils/modcss.inc

    re019f2d rb46e5b74  
    66 |                                                                       | 
    77 | This file is part of the Roundcube Webmail client                     | 
    8  | Copyright (C) 2007-2010, Roundcube Dev. - Switzerland                 | 
     8 | Copyright (C) 2007-2011, Roundcube Dev. - Switzerland                 | 
    99 | Licensed under the GNU GPL                                            | 
    1010 |                                                                       | 
     
    2222$source = ''; 
    2323 
    24 $url = preg_replace('![^a-z0-9:./\-_?$&=%]!i', '', $_GET['u']); 
    25 if ($url === null) { 
     24$url = preg_replace('![^a-z0-9.-]!i', '', $_GET['_u']); 
     25if ($url === null || !($realurl = $_SESSION['modcssurls'][$url])) { 
    2626    header('HTTP/1.1 403 Forbidden'); 
    27     echo $error; 
     27    echo "Unauthorized request"; 
    2828    exit; 
    2929} 
    3030 
    31 $a_uri = parse_url($url); 
     31$a_uri = parse_url($realurl); 
    3232$port  = $a_uri['port'] ? $a_uri['port'] : 80; 
    3333$host  = $a_uri['host']; 
     
    8686if (!empty($source) && in_array($mimetype, array('text/css','text/plain'))) { 
    8787    header('Content-Type: text/css'); 
    88     echo rcmail_mod_css_styles($source, preg_replace('/[^a-z0-9]/i', '', $_GET['c'])); 
     88    echo rcmail_mod_css_styles($source, preg_replace('/[^a-z0-9]/i', '', $_GET['_c'])); 
    8989    exit; 
    9090} 
  • skins/default/common.css

    r98cb0f1 rb46e5b74  
    1010body.iframe 
    1111{ 
    12   margin: 0px; 
     12  margin: 20px 0 0 0; 
    1313  background-color: #FFF; 
    1414} 
     
    253253{ 
    254254  float: right; 
     255} 
     256 
     257body.iframe .boxtitle 
     258{ 
     259  position: fixed; 
     260  top: 0; 
     261  left: 0; 
     262  width: 100%; 
    255263} 
    256264 
  • skins/default/functions.js

    r5206569 rb46e5b74  
    5050    a   = $('<a>').text(legend.text()).attr('href', '#'); 
    5151    tab = $('<span>').attr({'id': 'tab'+idx, 'class': 'tablink'}) 
    52         .click(function() { return rcube_show_tab(id, idx); }) 
     52        .click(function() { rcube_show_tab(id, idx); return false }) 
    5353 
    5454    // remove legend 
  • skins/default/mail.css

    r98cb0f1 rb46e5b74  
    10031003div.messageheaderbox 
    10041004{ 
    1005   margin: 6px 8px 0px 8px; 
     1005  margin: -14px 8px 0px 8px; 
    10061006  border: 1px solid #ccc; 
    10071007} 
Note: See TracChangeset for help on using the changeset viewer.