Merge branch 'release-0.8' of github.com:roundcube/roundcubemail into release-0.8
| | |
| | | RewriteEngine On |
| | | RewriteRule ^favicon\.ico$ skins/default/images/favicon.ico |
| | | # security rules |
| | | RewriteRule .git/ - [F] |
| | | RewriteRule ^README|INSTALL|LICENSE|SQL|bin|CHANGELOG$ - [F] |
| | | RewriteRule .git - [F] |
| | | RewriteRule ^/?(README(.md)?|INSTALL|LICENSE|SQL|bin|CHANGELOG)$ - [F] |
| | | </IfModule> |
| | | |
| | | <IfModule mod_deflate.c> |
| | |
| | | CHANGELOG Roundcube Webmail |
| | | =========================== |
| | | |
| | | - Move messages forwarding mode setting into Preferences |
| | | - Fix HTML entities handling in HTML editor (#1488483) |
| | | - Fix listing shared folders on Courier IMAP (#1488466) |
| | | |
| | |
| | | .css({'white-space': 'nowrap', overflow: 'hidden', position: 'relative'}) |
| | | .text(res[0]); |
| | | |
| | | link = $('<span class="blockquote-link">') |
| | | link = $('<span class="blockquote-link"></span>') |
| | | .css({position: 'absolute', 'z-Index': 2}) |
| | | .text(rcmail.gettext('hide_blockquote.show')) |
| | | .data('parent', div) |
| | |
| | | border-top: none; |
| | | border-bottom-right-radius: 6px; |
| | | border-bottom-left-radius: 6px; |
| | | background: #fff; |
| | | background: #f8f8f8; |
| | | background: -moz-linear-gradient(top, #f8f8f8 0%, #e8e8e8 100%); |
| | | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f8f8f8), color-stop(100%,#e8e8e8)); |
| | | background: -o-linear-gradient(top, #f8f8f8 0%, #e8e8e8 100%); |
| | |
| | | // 5: domain-username |
| | | // 6: username_domain |
| | | // 7: domain_username |
| | | $rcmail_config['password_virtualmin_format'] = 0; |
| | | // 8: username@domain; mbox.username |
| | | $rcmail_config['password_virtualmin_format'] = 8; |
| | | |
| | | |
| | | // pw_usermod Driver options |
| | |
| | | $pieces = explode("_", $username); |
| | | $domain = $pieces[0]; |
| | | break; |
| | | case 8: // domain taken from alias, username left as it was |
| | | $email = $rcmail->user->data['alias']; |
| | | $domain = substr(strrchr($email, "@"), 1); |
| | | break |
| | | default: // username@domain |
| | | $domain = substr(strrchr($username, "@"), 1); |
| | | } |
| | |
| | | private $unsets = array(); |
| | | private $gc_handlers = array(); |
| | | private $cookiename = 'roundcube_sessauth'; |
| | | private $vars = false; |
| | | private $vars; |
| | | private $key; |
| | | private $now; |
| | | private $secret = ''; |
| | |
| | | $this->vars = base64_decode($sql_arr['vars']); |
| | | $this->key = $key; |
| | | |
| | | if (!empty($this->vars)) |
| | | return $this->vars; |
| | | return !empty($this->vars) ? (string) $this->vars : ''; |
| | | } |
| | | |
| | | return false; |
| | | return null; |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | // no session row in DB (db_read() returns false) |
| | | if (!$this->key) { |
| | | $oldvars = false; |
| | | $oldvars = null; |
| | | } |
| | | // use internal data from read() for fast requests (up to 0.5 sec.) |
| | | else if ($key == $this->key && (!$this->vars || $ts - $this->start < 0.5)) { |
| | |
| | | $oldvars = $this->db_read($key); |
| | | } |
| | | |
| | | if ($oldvars !== false) { |
| | | if ($oldvars !== null) { |
| | | $newvars = $this->_fixvars($vars, $oldvars); |
| | | |
| | | if ($newvars !== $oldvars) { |
| | |
| | | */ |
| | | private function _fixvars($vars, $oldvars) |
| | | { |
| | | if ($oldvars !== false) { |
| | | if ($oldvars !== null) { |
| | | $a_oldvars = $this->unserialize($oldvars); |
| | | if (is_array($a_oldvars)) { |
| | | foreach ((array)$this->unsets as $k) |
| | |
| | | $this->vars = $arr['vars']; |
| | | $this->key = $key; |
| | | |
| | | if (!empty($this->vars)) |
| | | return $this->vars; |
| | | return !empty($this->vars) ? (string) $this->vars : ''; |
| | | } |
| | | |
| | | return false; |
| | | return null; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Save session data. |
| | |
| | | |
| | | // no session data in cache (mc_read() returns false) |
| | | if (!$this->key) |
| | | $oldvars = false; |
| | | $oldvars = null; |
| | | // use internal data for fast requests (up to 0.5 sec.) |
| | | else if ($key == $this->key && (!$this->vars || $ts - $this->start < 0.5)) |
| | | $oldvars = $this->vars; |
| | | else // else read data again |
| | | $oldvars = $this->mc_read($key); |
| | | |
| | | $newvars = $oldvars !== false ? $this->_fixvars($vars, $oldvars) : $vars; |
| | | |
| | | $newvars = $oldvars !== null ? $this->_fixvars($vars, $oldvars) : $vars; |
| | | |
| | | if ($newvars !== $oldvars || $ts - $this->changed > $this->lifetime / 2) |
| | | return $this->memcache->set($key, serialize(array('changed' => time(), 'ip' => $this->ip, 'vars' => $newvars)), MEMCACHE_COMPRESSED, $this->lifetime); |
| | | |
| | | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Handler for session_destroy() with memcache backend |
| | |
| | | { |
| | | session_regenerate_id($destroy); |
| | | |
| | | $this->vars = false; |
| | | $this->vars = null; |
| | | $this->key = session_id(); |
| | | |
| | | return true; |
| | |
| | | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Kill this session |
| | | */ |
| | | public function kill() |
| | | { |
| | | $this->vars = false; |
| | | $this->vars = null; |
| | | $this->ip = $_SERVER['REMOTE_ADDR']; // update IP (might have changed) |
| | | $this->destroy(session_id()); |
| | | rcmail::setcookie($this->cookiename, '-del-', time() - 60); |
| | |
| | | $labels['spellcheckignorecaps'] = 'Ignore words with all letters capitalized'; |
| | | $labels['addtodict'] = 'Add to dictionary'; |
| | | $labels['mailtoprotohandler'] = 'Register protocol handler for mailto: links'; |
| | | $labels['forwardmode'] = 'Messages forwarding'; |
| | | $labels['inline'] = 'inline'; |
| | | $labels['asattachment'] = 'as attachment'; |
| | | |
| | | $labels['folder'] = 'Folder'; |
| | | $labels['folders'] = 'Folders'; |
| | |
| | | ); |
| | | } |
| | | |
| | | if (!isset($no_override['forward_attachment'])) { |
| | | $field_id = 'rcmfd_forward_attachment'; |
| | | $select = new html_select(array('name' => '_forward_attachment', 'id' => $field_id)); |
| | | $select->add(rcube_label('inline'), 0); |
| | | $select->add(rcube_label('asattachment'), 1); |
| | | |
| | | $blocks['main']['options']['forward_attachment'] = array( |
| | | 'title' => html::label($field_id, Q(rcube_label('forwardmode'))), |
| | | 'content' => $select->show(intval($config['forward_attachment'])), |
| | | ); |
| | | } |
| | | |
| | | if (!isset($no_override['default_font'])) { |
| | | $field_id = 'rcmfd_default_font'; |
| | | $fonts = rcube_fontdefs(); |
| | |
| | | 'strip_existing_sig' => isset($_POST['_strip_existing_sig']), |
| | | 'sig_above' => !empty($_POST['_sig_above']) && !empty($_POST['_top_posting']), |
| | | 'default_font' => get_input_value('_default_font', RCUBE_INPUT_POST), |
| | | 'forward_attachment' => !empty($_POST['_forward_attachment']), |
| | | ); |
| | | |
| | | break; |
| | |
| | | </div> |
| | | |
| | | <div id="forwardmenu" class="popupmenu"> |
| | | <ul class="toolbarmenu"> |
| | | <li class="block"> |
| | | <input type="radio" name="forwardtype" value="0" onchange="rcmail.command('save-pref', {name: 'forward_attachment', value: 0, env: 'forward_attachment'});" /> |
| | | <roundcube:button command="forward" label="forwardinline" prop="sub" classAct="forwardlink active" class="forwardlink" /> |
| | | </li> |
| | | <li class="block"> |
| | | <input type="radio" name="forwardtype" value="1" onchange="rcmail.command('save-pref', {name: 'forward_attachment', value: 1, env: 'forward_attachment'})" /> |
| | | <roundcube:button command="forward-attachment" label="forwardattachment" prop="sub" classAct="forwardattachmentlink active" class="forwardattachmentlink" /> |
| | | </li> |
| | | <ul> |
| | | <li><roundcube:button command="forward" label="forwardinline" prop="sub" classAct="forwardlink active" class="forwardlink" /></li> |
| | | <li><roundcube:button command="forward-attachment" label="forwardattachment" prop="sub" classAct="forwardattachmentlink active" class="forwardattachmentlink" /></li> |
| | | <roundcube:container name="forwardmenu" id="forwardmenu" /> |
| | | </ul> |
| | | </div> |