diff --git a/CHANGELOG b/CHANGELOG index 00f78b728..a0012d642 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,17 +1,32 @@ CHANGELOG Roundcube Webmail =========================== +- Update to jQuery 3.4.0 +- Clarified 'address_book_type' option behavior (#6680) +- Added cookie mismatch detection, display an error message informing the user to clear cookies +- Renamed 'log_session' option to 'session_debug' - Password: Added ldap_exop driver (#4992) +- Don't log full session identifiers in userlogins log (#6625) +- installto.sh: Add possibility to run the update even on the up-to-date installation (#6533) - Elastic: Add Prev/Next buttons on message page toolbar (#6648) - Elastic: Close search options on Enter key press in quick-search input (#6660) - Elastic: Changed read/unread icons (#6636) - Elastic: Changed "Move to..." icon (#6637) - Elastic: Add hide/show for advanced preferences (#6632) - Elastic: Fix bug where toolbar disappears on attachment menu use in Chrome (#6677) +- Elastic: Fix folders list scrolling on touch devices (#6706) +- Elastic: Fix non-working pretty selects in Chrome browser (#6705) +- Managesieve: Fix bug where global includes were requested for vacation (#6716) +- Managesieve: Use RFC-compliant line endings, CRLF instead of LF (#6686) +- Managesieve: Fix so "Create filter" option does not show up when Filters menu is disabled (#6723) +- Fix bug in HTML parser that could cause missing text fragments when there was no head/body tag (#6713) +- Fix bug where HTML messages with a xml:namespace tag were not rendered (#6697) +- Fix TinyMCE download location (#6694) - Fix so "Open in new window" consistently displays "external window" interface (#6659) - Fix bug where next row wasn't selected after deleting a collapsed thread (#6655) - Fix bug where external content (e.g. mail body) was passed to templates parsing code (#6640) - Fix bug where attachment preview didn't work with x_frame_options=deny (#6688) +- Fix so bin/install-jsdeps.sh returns error code on error (#6704) RELEASE 1.4-rc1 --------------- diff --git a/INSTALL b/INSTALL index 57551b264..29d37d2b0 100644 --- a/INSTALL +++ b/INSTALL @@ -296,3 +296,9 @@ SELINUX. Here's some sample commands for SELINUX: $ semanage fcontext -a -t httpd_sys_rw_content_t "/path_to_roundcube/logs(/.*)?" $ semanage fcontext -a -t httpd_sys_rw_content_t "/path_to_roundcube/temp(/.*)?" $ restorecon -Rv /path_to_roundcube/ + +Microsoft IIS Server by default does not support WOFF fonts used in Elastic skin. It might be +needed to add following MIME Types definitions (via web.config or IIS Manager): + + .woff application/font-woff + .woff2 application/font-woff2 diff --git a/bin/cleandb.sh b/bin/cleandb.sh index 0bf71ea62..f54ad98f9 100755 --- a/bin/cleandb.sh +++ b/bin/cleandb.sh @@ -2,10 +2,9 @@ | +-----------------------------------------------------------------------+ diff --git a/bin/decrypt.sh b/bin/decrypt.sh index dd4525972..b3a9d4673 100755 --- a/bin/decrypt.sh +++ b/bin/decrypt.sh @@ -2,10 +2,9 @@ | +-----------------------------------------------------------------------+ diff --git a/bin/deluser.sh b/bin/deluser.sh index 63473012d..984320fd1 100755 --- a/bin/deluser.sh +++ b/bin/deluser.sh @@ -3,10 +3,9 @@ /* +-----------------------------------------------------------------------+ - | bin/deluser.sh | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2014, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/bin/dumpschema.sh b/bin/dumpschema.sh index d1d2999d6..20f0c5e91 100755 --- a/bin/dumpschema.sh +++ b/bin/dumpschema.sh @@ -2,10 +2,9 @@ | +-----------------------------------------------------------------------+ diff --git a/bin/exportgettext.sh b/bin/exportgettext.sh index 314cae7d2..e2f866854 100755 --- a/bin/exportgettext.sh +++ b/bin/exportgettext.sh @@ -2,11 +2,13 @@ | +-----------------------------------------------------------------------+ diff --git a/bin/importgettext.sh b/bin/importgettext.sh index 5a91e6bc1..fde141c3d 100755 --- a/bin/importgettext.sh +++ b/bin/importgettext.sh @@ -2,11 +2,13 @@ | +-----------------------------------------------------------------------+ @@ -24,13 +23,14 @@ define('INSTALL_PATH', realpath(__DIR__ . '/..') . '/' ); require_once INSTALL_PATH . 'program/include/clisetup.php'; if (!function_exists('exec')) { - die("PHP exec() function is required. Check disable_functions in php.ini\n"); + rcube::raise_error("PHP exec() function is required. Check disable_functions in php.ini.", false, true); } -$SOURCES = json_decode(file_get_contents(INSTALL_PATH . 'jsdeps.json'), true); +$cfgfile = INSTALL_PATH . 'jsdeps.json'; +$SOURCES = json_decode(file_get_contents($cfgfile), true); if (empty($SOURCES['dependencies'])) { - die("ERROR: Failed to read sources from " . INSTALL_PATH . "jsdeps.json\n"); + rcube::raise_error("Failed to read dependencies list from $cfgfile", false, true); } $CURL = trim(`which curl`); @@ -116,7 +116,7 @@ function fetch_from_source($package, $useCache = true, &$filetype = null) if (!is_readable($cache_file) || !$useCache) { if (empty($CURL) && empty($WGET)) { - die("ERROR: Required program 'wget' or 'curl' not found\n"); + rcube::raise_error("Required 'wget' or 'curl' program not found.", false, true); } $url = str_replace('$v', $package['version'], $package['url']); @@ -133,7 +133,7 @@ function fetch_from_source($package, $useCache = true, &$filetype = null) $url = str_replace('$v', $package['version'], $package['api_url']); $header = 'Accept:application/vnd.github.v3.raw'; - echo "Fetching failed. Using Github API on $url\n"; + rcube::raise_error("Fetching failed. Using Github API on $url"); if ($CURL) exec(sprintf('%s -L -H %s -s %s -o %s', $CURL, escapeshellarg($header), escapeshellarg($url), $cache_file), $out, $retval); @@ -142,7 +142,7 @@ function fetch_from_source($package, $useCache = true, &$filetype = null) } if ($retval !== 0) { - die("ERROR: Failed to download source file from " . $url . "\n"); + rcube::raise_error("Failed to download source file from $url", false, true); } } @@ -160,7 +160,7 @@ function extract_filetype($package, &$filetype = null) $cache_file = $CACHEDIR . '/' . $package['lib'] . '-' . $package['version'] . '.' . $filetype; if (empty($FILEINFO)) { - die("ERROR: Required program 'file' not found\n"); + rcube::raise_error("Required program 'file' not found.", false, true); } // detect downloaded/cached file type @@ -207,7 +207,7 @@ function compose_destfile($package, $srcfile) echo "Wrote file " . INSTALL_PATH . $package['dest'] . "\n"; } else { - die("ERROR: Failed to write destination file " . INSTALL_PATH . $package['dest'] . "\n"); + rcube::raise_error("Failed to write destination file " . INSTALL_PATH . $package['dest'], false, true); } } @@ -219,7 +219,7 @@ function extract_zipfile($package, $srcfile) global $UNZIP, $CACHEDIR; if (empty($UNZIP)) { - die("ERROR: Required program 'unzip' not found\n"); + rcube::raise_error("Required 'unzip' program not found.", false, true); } $destdir = INSTALL_PATH . $package['dest']; @@ -228,7 +228,7 @@ function extract_zipfile($package, $srcfile) } if (!is_writeable($destdir)) { - die("ERROR: Cannot write to destination directory $destdir\n"); + rcube::raise_error("Cannot write to destination directory: $destdir", false, true); } // pick files from zip archive @@ -237,7 +237,7 @@ function extract_zipfile($package, $srcfile) echo "Extracting files $pattern into $destdir\n"; exec(sprintf('%s -o %s %s -d %s', $UNZIP, escapeshellarg($srcfile), escapeshellarg($pattern), $destdir), $out, $retval); if ($retval !== 0) { - echo "ERROR: Failed to unpack $pattern; " . join('; ' . $out) . "\n"; + rcube::raise_error("Failed to unpack $pattern; " . join('; ' . $out)); } } } @@ -273,7 +273,7 @@ function extract_zipfile($package, $srcfile) exec(sprintf('mv -f %s/%s %s/%s', $sourcedir, $src, $destdir, $dest), $out, $retval); if ($retval !== 0) { - echo "ERROR: Failed to move $src into $destdir/$dest; " . join('; ' . $out) . "\n"; + rcube::raise_error("Failed to move $src into $destdir/$dest; " . join('; ' . $out)); } } @@ -285,7 +285,7 @@ function extract_zipfile($package, $srcfile) echo "Extracting zip archive into $destdir\n"; exec(sprintf('%s -o %s -d %s', $UNZIP, escapeshellarg($srcfile), $destdir), $out, $retval); if ($retval !== 0) { - echo "ERROR: Failed to unzip $srcfile; " . join('; ' . $out) . "\n"; + rcube::raise_error("Failed to unzip $srcfile; " . join('; ' . $out)); } } @@ -357,7 +357,7 @@ foreach ($SOURCES['dependencies'] as $package) { } if (!empty($package['sha1']) && ($sum = sha1_file($srcfile)) !== $package['sha1']) { - die("ERROR: Incorrect sha1 sum of $srcfile. Expected: {$package['sha1']}, got: $sum\n"); + rcube::raise_error("Incorrect sha1 sum of $srcfile. Expected: {$package['sha1']}, got: $sum", false, true); } if ($args['extract']) { diff --git a/bin/installto.sh b/bin/installto.sh index f16f01622..e206dfd79 100755 --- a/bin/installto.sh +++ b/bin/installto.sh @@ -2,10 +2,9 @@ =')) - rcube::raise_error("Installation at target location is up-to-date!", false, true); +if (version_compare(version_parse($oldversion), version_parse(RCMAIL_VERSION), '>')) + rcube::raise_error("Target installation already in version $oldversion.", false, true); + +if (version_compare(version_parse($oldversion), version_parse(RCMAIL_VERSION), '==')) { + echo "Target installation already in version $oldversion. Do you want to update again? (y/N)\n"; +} +else { + echo "Upgrading from $oldversion. Do you want to continue? (y/N)\n"; +} -echo "Upgrading from $oldversion. Do you want to continue? (y/N)\n"; $input = trim(fgets(STDIN)); if (strtolower($input) == 'y') { echo "Copying files to target location..."; $adds = array(); - $dirs = array('program','bin','SQL','plugins','skins'); + $dirs = array('bin','SQL','plugins','skins','program'); if (is_dir(INSTALL_PATH . 'vendor') && !is_file("$target_dir/composer.json")) { $dirs[] = 'vendor'; diff --git a/bin/moduserprefs.sh b/bin/moduserprefs.sh index 94f9ec297..c7dada01f 100755 --- a/bin/moduserprefs.sh +++ b/bin/moduserprefs.sh @@ -2,10 +2,9 @@ | + +-----------------------------------------------------------------------+ +*/ define('INSTALL_PATH', realpath(__DIR__ . '/..') . '/' ); ini_set('memory_limit', -1); diff --git a/bin/msgimport.sh b/bin/msgimport.sh index 0c72622c4..42077c23a 100755 --- a/bin/msgimport.sh +++ b/bin/msgimport.sh @@ -1,5 +1,18 @@ #!/usr/bin/env php | + +-----------------------------------------------------------------------+ +*/ define('INSTALL_PATH', realpath(__DIR__ . '/..') . '/' ); ini_set('memory_limit', -1); diff --git a/bin/package2composer.sh b/bin/package2composer.sh index 5f3438cd0..3f9b15025 100755 --- a/bin/package2composer.sh +++ b/bin/package2composer.sh @@ -2,10 +2,9 @@ | +-----------------------------------------------------------------------+ diff --git a/bin/update.sh b/bin/update.sh index 08e3bb531..5134dceb9 100755 --- a/bin/update.sh +++ b/bin/update.sh @@ -2,10 +2,9 @@ // exists and is writable. $config['per_user_logging'] = false; -// Log sent messages to /sendmail or to syslog +// Log sent messages to /sendmail.log or to syslog $config['smtp_log'] = true; -// Log successful/failed logins to /userlogins or to syslog +// Log successful/failed logins to /userlogins.log or to syslog $config['log_logins'] = false; -// Log session authentication errors to /session or to syslog -$config['log_session'] = false; +// Log session debug information/authentication errors to /session.log or to syslog +$config['session_debug'] = false; -// Log SQL queries to /sql or to syslog +// Log SQL queries to /sql.log or to syslog $config['sql_debug'] = false; -// Log IMAP conversation to /imap or to syslog +// Log IMAP conversation to /imap.log or to syslog $config['imap_debug'] = false; -// Log LDAP conversation to /ldap or to syslog +// Log LDAP conversation to /ldap.log or to syslog $config['ldap_debug'] = false; -// Log SMTP conversation to /smtp or to syslog +// Log SMTP conversation to /smtp.log or to syslog $config['smtp_debug'] = false; -// Log Memcache conversation to /memcache or to syslog +// Log Memcache conversation to /memcache.log or to syslog $config['memcache_debug'] = false; -// Log APC conversation to /apc or to syslog +// Log APC conversation to /apc.log or to syslog $config['apc_debug'] = false; -// Log Redis conversation to /redis or to syslog +// Log Redis conversation to /redis.log or to syslog $config['redis_debug'] = false; @@ -812,12 +812,10 @@ $config['compose_responses_static'] = array( // ---------------------------------- // This indicates which type of address book to use. Possible choises: -// 'sql' (default), 'ldap' and ''. -// If set to 'ldap' then it will look at using the first writable LDAP -// address book as the primary address book and it will not display the -// SQL address book in the 'Address Book' view. -// If set to '' then no address book will be displayed or only the -// addressbook which is created by a plugin (like CardDAV). +// 'sql' - built-in sql addressbook enabled (default), +// '' - built-in sql addressbook disabled. +// Still LDAP or plugin-added addressbooks will be available. +// BC Note: The value can actually be anything except 'sql', it does not matter. $config['address_book_type'] = 'sql'; // In order to enable public ldap search, configure an array like the Verisign diff --git a/index-test.php b/index-test.php index b880f7c1f..db991b82a 100644 --- a/index-test.php +++ b/index-test.php @@ -4,7 +4,7 @@ +-----------------------------------------------------------------------+ | Roundcube Webmail Selenium Tests Entry Point | | | - | Copyright (C) 2005-2014, The Roundcube Dev Team | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/index.php b/index.php index f0dc37ac1..40966fc83 100644 --- a/index.php +++ b/index.php @@ -4,7 +4,7 @@ | Roundcube Webmail IMAP Client | | Version 1.4-git | | | - | Copyright (C) 2005-2018, The Roundcube Dev Team | + | Copyright (C) The Roundcube Dev Team | | | | This program is free software: you can redistribute it and/or modify | | it under the terms of the GNU General Public License (with exceptions | @@ -205,24 +205,14 @@ else if ($RCMAIL->task == 'logout' && isset($_SESSION['user_id'])) { else if ($RCMAIL->task != 'login' && $_SESSION['user_id']) { if (!$RCMAIL->session->check_auth()) { $RCMAIL->kill_session(); - $session_error = true; + $session_error = 'sessionerror'; } } // not logged in -> show login page if (empty($RCMAIL->user->ID)) { - // log session failures - $task = rcube_utils::get_input_value('_task', rcube_utils::INPUT_GPC); - - if ($task && !in_array($task, array('login','logout')) - && !$session_error && ($sess_id = $_COOKIE[ini_get('session.name')]) - ) { - $RCMAIL->session->log("Aborted session $sess_id; no valid session data found"); - $session_error = true; - } - - if ($session_error || $_REQUEST['_err'] == 'session') { - $OUTPUT->show_message('sessionerror', 'error', null, true, -1); + if ($session_error || $_REQUEST['_err'] === 'session' || ($session_error = $RCMAIL->session_error())) { + $OUTPUT->show_message($session_error ?: 'sessionerror', 'error', null, true, -1); } if ($OUTPUT->ajax_call || $OUTPUT->get_env('framed')) { diff --git a/installer/check.php b/installer/check.php index 3d2538191..0c5175cbb 100644 --- a/installer/check.php +++ b/installer/check.php @@ -1,5 +1,19 @@ | + +-----------------------------------------------------------------------+ +*/ + if (!class_exists('rcmail_install', false) || !is_object($RCI)) { die("Not allowed! Please open installer/index.php instead."); } diff --git a/installer/client.js b/installer/client.js index 2880ce34f..a2bdc89e2 100644 --- a/installer/client.js +++ b/installer/client.js @@ -2,13 +2,12 @@ +-----------------------------------------------------------------------+ | Roundcube installer client function | | | - | This file is part of the Roundcube web development suite | - | Copyright (C) 2009-2012, The Roundcube Dev Team | + | This file is part of the Roundcube Webmail client | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | | See the README file for a full license statement. | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ @@ -17,7 +16,7 @@ function toggleblock(id, link) { var block = document.getElementById(id); - + return false; } @@ -28,14 +27,14 @@ function addhostfield() var row = document.createElement('div'); var input = document.createElement('input'); var link = document.createElement('a'); - + input.name = '_default_host[]'; input.size = '30'; link.href = '#'; link.onclick = function() { removehostfield(this.parentNode); return false }; link.className = 'removelink'; link.innerHTML = 'remove'; - + row.appendChild(input); row.appendChild(link); container.appendChild(row); diff --git a/installer/config.php b/installer/config.php index 90fa9929c..a246dc749 100644 --- a/installer/config.php +++ b/installer/config.php @@ -1,5 +1,19 @@ | + +-----------------------------------------------------------------------+ +*/ + if (!class_exists('rcmail_install', false) || !is_object($RCI)) { die("Not allowed! Please open installer/index.php instead."); } diff --git a/installer/index.php b/installer/index.php index 56b4122fe..51963c462 100644 --- a/installer/index.php +++ b/installer/index.php @@ -5,7 +5,7 @@ | Roundcube Webmail setup tool | | Version 1.4-git | | | - | Copyright (C) 2009-2017, The Roundcube Dev Team | + | Copyright (C) The Roundcube Dev Team | | | | This program is free software: you can redistribute it and/or modify | | it under the terms of the GNU General Public License (with exceptions | diff --git a/installer/test.php b/installer/test.php index 5c503ee6e..40d7a39d8 100644 --- a/installer/test.php +++ b/installer/test.php @@ -1,4 +1,17 @@ | + +-----------------------------------------------------------------------+ +*/ if (!class_exists('rcmail_install', false) || !is_object($RCI)) { die("Not allowed! Please open installer/index.php instead."); diff --git a/jsdeps.json b/jsdeps.json index 53454801e..82e2ea5f2 100644 --- a/jsdeps.json +++ b/jsdeps.json @@ -3,10 +3,10 @@ { "lib": "jquery", "name": "jQuery", - "version": "3.3.1", + "version": "3.4.0", "url": "https://code.jquery.com/jquery-$v.min.js", "dest": "program/js/jquery.min.js", - "sha1": "0dc32db4aa9c5f03f3b38c47d883dbd4fed13aae", + "sha1": "e4925196f6f444fa58915420fbcd80f909c68d28", "license": "MIT", "copyright": "Copyright JS Foundation and other contributors", "source": "https://github.com/jquery/jquery/tree/$v" @@ -37,7 +37,7 @@ { "lib": "tinymce", "version": "4.8.2", - "url": "http://download.ephox.com/tinymce/community/tinymce_$v.zip", + "url": "https://download.tiny.cloud/tinymce/community/tinymce_$v.zip", "dest": "program/js", "sha1": "d7fced05acdeeb78299585ea9909b0de2b3d759d", "license": "LGPL", @@ -57,7 +57,7 @@ { "lib": "tinymce-langs", "version": "4.8.2", - "url": "https://tinymce-services.azurewebsites.net/1/i18n/download?langs=ar,hy,az,eu,be,bs,bg_BG,ca,zh_CN,zh_TW,hr,cs,cs_CZ,da,nl,en_CA,en_GB,eo,et,fo,fi,fr_FR,fr_CH,gd,gl,ka_GE,de,de_AT,el,he_IL,hi_IN,hu_HU,is_IS,id,ga,it,ja,kab,km_KH,ko_KR,ku,ku_IQ,lv,lt,lb,mk_MK,ml_IN,nb_NO,oc,fa,fa_IR,pl,pt_BR,pt_PT,ro,ru,sk,sl_SI,es,es_MX,sv_SE,tg,ta,ta_IN,tt,th_TH,tr,tr_TR,ug,uk,uk_UA,vi,vi_VN,cy&extension=.zip", + "url": "https://www.tiny.cloud/docs-4x/language/tinymce4x_languages.zip", "dest": "program/js/tinymce" }, { diff --git a/plugins/acl/acl.js b/plugins/acl/acl.js index 7cfed90fd..97975a299 100644 --- a/plugins/acl/acl.js +++ b/plugins/acl/acl.js @@ -1,5 +1,18 @@ /** * ACL plugin script + * + * @licstart The following is the entire license notice for the + * JavaScript code in this file. + * + * Copyright (c) The Roundcube Dev Team + * + * The JavaScript code in this page is free software: you can redistribute it + * and/or modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * @licend The above is the entire license notice + * for the JavaScript code in this file. */ if (window.rcmail) { diff --git a/plugins/acl/acl.php b/plugins/acl/acl.php index 74044ee74..73a0fdacb 100644 --- a/plugins/acl/acl.php +++ b/plugins/acl/acl.php @@ -5,7 +5,7 @@ * * @author Aleksander Machniak * - * Copyright (C) 2011-2012, Kolab Systems AG + * Copyright (C) Kolab Systems AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/plugins/acl/localization/en_US.inc b/plugins/acl/localization/en_US.inc index e35d22a3f..22c58b975 100644 --- a/plugins/acl/localization/en_US.inc +++ b/plugins/acl/localization/en_US.inc @@ -2,15 +2,13 @@ /* +-----------------------------------------------------------------------+ - | plugins/acl/localization/.inc | - | | | Localization file of the Roundcube Webmail ACL plugin | - | Copyright (C) 2012-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | | See the README file for a full license statement. | - | | +-----------------------------------------------------------------------+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-acl/ diff --git a/plugins/archive/archive.js b/plugins/archive/archive.js index 6ae93fac0..f8b280412 100644 --- a/plugins/archive/archive.js +++ b/plugins/archive/archive.js @@ -4,7 +4,7 @@ * @licstart The following is the entire license notice for the * JavaScript code in this file. * - * Copyright (c) 2012-2016, The Roundcube Dev Team + * Copyright (c) The Roundcube Dev Team * * The JavaScript code in this page is free software: you can redistribute it * and/or modify it under the terms of the GNU General Public License diff --git a/plugins/archive/localization/en_US.inc b/plugins/archive/localization/en_US.inc index 600d1ddc6..1ef8692f9 100644 --- a/plugins/archive/localization/en_US.inc +++ b/plugins/archive/localization/en_US.inc @@ -2,15 +2,13 @@ /* +-----------------------------------------------------------------------+ - | plugins/archive/localization/.inc | - | | | Localization file of the Roundcube Webmail Archive plugin | - | Copyright (C) 2016, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | | See the README file for a full license statement. | - | | +-----------------------------------------------------------------------+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-archive/ diff --git a/plugins/attachment_reminder/attachment_reminder.js b/plugins/attachment_reminder/attachment_reminder.js index 32d10e65c..973ff5561 100644 --- a/plugins/attachment_reminder/attachment_reminder.js +++ b/plugins/attachment_reminder/attachment_reminder.js @@ -4,7 +4,7 @@ * @licstart The following is the entire license notice for the * JavaScript code in this file. * - * Copyright (c) 2013, The Roundcube Dev Team + * Copyright (c) The Roundcube Dev Team * * The JavaScript code in this page is free software: you can redistribute it * and/or modify it under the terms of the GNU General Public License diff --git a/plugins/attachment_reminder/attachment_reminder.php b/plugins/attachment_reminder/attachment_reminder.php index dfc25abd1..77d774a48 100644 --- a/plugins/attachment_reminder/attachment_reminder.php +++ b/plugins/attachment_reminder/attachment_reminder.php @@ -8,7 +8,7 @@ * @author Aleksander Machniak * * Copyright (C) 2013 Thomas Yu - Sian, Liu - * Copyright (C) 2013, Kolab Systems AG + * Copyright (C) Kolab Systems AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -77,7 +77,7 @@ class attachment_reminder extends rcube_plugin $args['prefs']['attachment_reminder'] = !empty($_POST['_attachment_reminder']); } } + return $args; } - } diff --git a/plugins/attachment_reminder/localization/en_US.inc b/plugins/attachment_reminder/localization/en_US.inc index bca2bf169..b1fdc9e37 100644 --- a/plugins/attachment_reminder/localization/en_US.inc +++ b/plugins/attachment_reminder/localization/en_US.inc @@ -2,15 +2,12 @@ /* +-----------------------------------------------------------------------+ - | plugins/attachment_reminder/localization/.inc | - | | | Localization file of the Roundcube Webmail Archive plugin | - | Copyright (C) 2013, The Roundcube Dev Team | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | | See the README file for a full license statement. | - | | +-----------------------------------------------------------------------+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-attachment_reminder/ diff --git a/plugins/database_attachments/database_attachments.php b/plugins/database_attachments/database_attachments.php index b06717458..bd9d681bd 100644 --- a/plugins/database_attachments/database_attachments.php +++ b/plugins/database_attachments/database_attachments.php @@ -13,7 +13,7 @@ * @author Ziba Scott * @author Aleksander Machniak * - * Copyright (C) 2011-2018, The Roundcube Dev Team + * Copyright (C) The Roundcube Dev Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 diff --git a/plugins/emoticons/localization/en_US.inc b/plugins/emoticons/localization/en_US.inc index 04b10964d..c1ab1dab8 100644 --- a/plugins/emoticons/localization/en_US.inc +++ b/plugins/emoticons/localization/en_US.inc @@ -2,15 +2,13 @@ /* +-----------------------------------------------------------------------+ - | plugins/emoticons/localization/.inc | - | | | Localization file of the Roundcube Webmail Emoticons plugin | - | Copyright (C) 2012-2015, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | | See the README file for a full license statement. | - | | +-----------------------------------------------------------------------+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-emoticons/ diff --git a/plugins/enigma/enigma.js b/plugins/enigma/enigma.js index fe2a599f5..1bc65e749 100644 --- a/plugins/enigma/enigma.js +++ b/plugins/enigma/enigma.js @@ -1,4 +1,19 @@ -/* Enigma Plugin */ +/** + * Enigma plugin script + * + * @licstart The following is the entire license notice for the + * JavaScript code in this file. + * + * Copyright (c) The Roundcube Dev Team + * + * The JavaScript code in this page is free software: you can redistribute it + * and/or modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * @licend The above is the entire license notice + * for the JavaScript code in this file. + */ window.rcmail && rcmail.addEventListener('init', function(evt) { if (rcmail.env.task == 'settings') { @@ -59,7 +74,7 @@ window.rcmail && rcmail.addEventListener('init', function(evt) { e.stopPropagation(); }); - $('a.button.enigma').prop('tabindex', $('#messagetoolbar > a:first').prop('tabindex')); + $('a.button.enigma').prop('tabindex', $('#messagetoolbar > a').first().prop('tabindex')); $.each(['encrypt', 'sign'], function() { var opt = this, input = $('#enigma' + opt + 'opt'); diff --git a/plugins/enigma/enigma.php b/plugins/enigma/enigma.php index 5a5bbc03d..fda9338ba 100644 --- a/plugins/enigma/enigma.php +++ b/plugins/enigma/enigma.php @@ -4,12 +4,11 @@ +-------------------------------------------------------------------------+ | Enigma Plugin for Roundcube | | | - | Copyright (C) 2010-2015 The Roundcube Dev Team | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | | See the README file for a full license statement. | - | | +-------------------------------------------------------------------------+ | Author: Aleksander Machniak | +-------------------------------------------------------------------------+ diff --git a/plugins/enigma/lib/enigma_driver.php b/plugins/enigma/lib/enigma_driver.php index bab3e9fc1..cf4a5bfe2 100644 --- a/plugins/enigma/lib/enigma_driver.php +++ b/plugins/enigma/lib/enigma_driver.php @@ -4,12 +4,11 @@ +-------------------------------------------------------------------------+ | Abstract driver for the Enigma Plugin | | | - | Copyright (C) 2010-2015 The Roundcube Dev Team | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | | See the README file for a full license statement. | - | | +-------------------------------------------------------------------------+ | Author: Aleksander Machniak | +-------------------------------------------------------------------------+ diff --git a/plugins/enigma/lib/enigma_driver_gnupg.php b/plugins/enigma/lib/enigma_driver_gnupg.php index 7d20becf7..80753f2ec 100644 --- a/plugins/enigma/lib/enigma_driver_gnupg.php +++ b/plugins/enigma/lib/enigma_driver_gnupg.php @@ -4,12 +4,11 @@ +-------------------------------------------------------------------------+ | GnuPG (PGP) driver for the Enigma Plugin | | | - | Copyright (C) 2010-2015 The Roundcube Dev Team | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | | See the README file for a full license statement. | - | | +-------------------------------------------------------------------------+ | Author: Aleksander Machniak | +-------------------------------------------------------------------------+ diff --git a/plugins/enigma/lib/enigma_driver_phpssl.php b/plugins/enigma/lib/enigma_driver_phpssl.php index e0a078461..be1277985 100644 --- a/plugins/enigma/lib/enigma_driver_phpssl.php +++ b/plugins/enigma/lib/enigma_driver_phpssl.php @@ -4,12 +4,11 @@ +-------------------------------------------------------------------------+ | S/MIME driver for the Enigma Plugin | | | - | Copyright (C) 2010-2015 The Roundcube Dev Team | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | | See the README file for a full license statement. | - | | +-------------------------------------------------------------------------+ | Author: Aleksander Machniak | +-------------------------------------------------------------------------+ diff --git a/plugins/enigma/lib/enigma_engine.php b/plugins/enigma/lib/enigma_engine.php index efe163a70..b63fd7937 100644 --- a/plugins/enigma/lib/enigma_engine.php +++ b/plugins/enigma/lib/enigma_engine.php @@ -4,12 +4,11 @@ +-------------------------------------------------------------------------+ | Engine of the Enigma Plugin | | | - | Copyright (C) 2010-2016 The Roundcube Dev Team | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | | See the README file for a full license statement. | - | | +-------------------------------------------------------------------------+ | Author: Aleksander Machniak | +-------------------------------------------------------------------------+ diff --git a/plugins/enigma/lib/enigma_error.php b/plugins/enigma/lib/enigma_error.php index 4c6931570..971f4c99c 100644 --- a/plugins/enigma/lib/enigma_error.php +++ b/plugins/enigma/lib/enigma_error.php @@ -4,12 +4,11 @@ +-------------------------------------------------------------------------+ | Error class for the Enigma Plugin | | | - | Copyright (C) 2010-2015 The Roundcube Dev Team | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | | See the README file for a full license statement. | - | | +-------------------------------------------------------------------------+ | Author: Aleksander Machniak | +-------------------------------------------------------------------------+ diff --git a/plugins/enigma/lib/enigma_key.php b/plugins/enigma/lib/enigma_key.php index b6c36b0ac..a4470da24 100644 --- a/plugins/enigma/lib/enigma_key.php +++ b/plugins/enigma/lib/enigma_key.php @@ -4,12 +4,11 @@ +-------------------------------------------------------------------------+ | Key class for the Enigma Plugin | | | - | Copyright (C) 2010-2015 The Roundcube Dev Team | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | | See the README file for a full license statement. | - | | +-------------------------------------------------------------------------+ | Author: Aleksander Machniak | +-------------------------------------------------------------------------+ diff --git a/plugins/enigma/lib/enigma_mime_message.php b/plugins/enigma/lib/enigma_mime_message.php index a81f3cfc6..e21c63ba8 100644 --- a/plugins/enigma/lib/enigma_mime_message.php +++ b/plugins/enigma/lib/enigma_mime_message.php @@ -4,12 +4,11 @@ +-------------------------------------------------------------------------+ | Mail_mime wrapper for the Enigma Plugin | | | - | Copyright (C) 2010-2015 The Roundcube Dev Team | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | | See the README file for a full license statement. | - | | +-------------------------------------------------------------------------+ | Author: Aleksander Machniak | +-------------------------------------------------------------------------+ diff --git a/plugins/enigma/lib/enigma_signature.php b/plugins/enigma/lib/enigma_signature.php index 8e9f1c9b5..a93edc60d 100644 --- a/plugins/enigma/lib/enigma_signature.php +++ b/plugins/enigma/lib/enigma_signature.php @@ -4,12 +4,11 @@ +-------------------------------------------------------------------------+ | Signature class for the Enigma Plugin | | | - | Copyright (C) 2010-2015 The Roundcube Dev Team | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | | See the README file for a full license statement. | - | | +-------------------------------------------------------------------------+ | Author: Aleksander Machniak | +-------------------------------------------------------------------------+ diff --git a/plugins/enigma/lib/enigma_subkey.php b/plugins/enigma/lib/enigma_subkey.php index 3fb5cc676..5905f4fec 100644 --- a/plugins/enigma/lib/enigma_subkey.php +++ b/plugins/enigma/lib/enigma_subkey.php @@ -4,12 +4,11 @@ +-------------------------------------------------------------------------+ | SubKey class for the Enigma Plugin | | | - | Copyright (C) 2010-2015 The Roundcube Dev Team | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | | See the README file for a full license statement. | - | | +-------------------------------------------------------------------------+ | Author: Aleksander Machniak | +-------------------------------------------------------------------------+ diff --git a/plugins/enigma/lib/enigma_ui.php b/plugins/enigma/lib/enigma_ui.php index 447804a9f..7ce169f25 100644 --- a/plugins/enigma/lib/enigma_ui.php +++ b/plugins/enigma/lib/enigma_ui.php @@ -4,12 +4,11 @@ +-------------------------------------------------------------------------+ | User Interface for the Enigma Plugin | | | - | Copyright (C) 2010-2015 The Roundcube Dev Team | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | | See the README file for a full license statement. | - | | +-------------------------------------------------------------------------+ | Author: Aleksander Machniak | +-------------------------------------------------------------------------+ diff --git a/plugins/enigma/lib/enigma_userid.php b/plugins/enigma/lib/enigma_userid.php index 11baef4db..d89e5a74b 100644 --- a/plugins/enigma/lib/enigma_userid.php +++ b/plugins/enigma/lib/enigma_userid.php @@ -4,12 +4,11 @@ +-------------------------------------------------------------------------+ | User ID class for the Enigma Plugin | | | - | Copyright (C) 2010-2015 The Roundcube Dev Team | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | | See the README file for a full license statement. | - | | +-------------------------------------------------------------------------+ | Author: Aleksander Machniak | +-------------------------------------------------------------------------+ diff --git a/plugins/enigma/localization/en_US.inc b/plugins/enigma/localization/en_US.inc index 2378328d1..5772be7ec 100644 --- a/plugins/enigma/localization/en_US.inc +++ b/plugins/enigma/localization/en_US.inc @@ -2,15 +2,13 @@ /** +-----------------------------------------------------------------------+ - | plugins/enigma/localization/.inc | + | Localization file of the Roundcube Webmail Enigma plugin | | | - | Localization file of the Roundcube Webmail ACL plugin | - | Copyright (C) 2012-2016, The Roundcube Dev Team | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | | See the README file for a full license statement. | - | | +-----------------------------------------------------------------------+ For translation see https://www.transifex.com/roundcube/roundcube-webmail/plugin-enigma/ diff --git a/plugins/example_addressbook/example_addressbook.php b/plugins/example_addressbook/example_addressbook.php index 22e230c6f..8f15c703b 100644 --- a/plugins/example_addressbook/example_addressbook.php +++ b/plugins/example_addressbook/example_addressbook.php @@ -11,43 +11,44 @@ require_once(__DIR__ . '/example_addressbook_backend.php'); */ class example_addressbook extends rcube_plugin { - private $abook_id = 'static'; - private $abook_name = 'Static List'; - - public function init() - { - $this->add_hook('addressbooks_list', array($this, 'address_sources')); - $this->add_hook('addressbook_get', array($this, 'get_address_book')); - - // use this address book for autocompletion queries - // (maybe this should be configurable by the user?) - $config = rcmail::get_instance()->config; - $sources = (array) $config->get('autocomplete_addressbooks', array('sql')); - if (!in_array($this->abook_id, $sources)) { - $sources[] = $this->abook_id; - $config->set('autocomplete_addressbooks', $sources); + private $abook_id = 'static'; + private $abook_name = 'Static List'; + + public function init() + { + $this->add_hook('addressbooks_list', array($this, 'address_sources')); + $this->add_hook('addressbook_get', array($this, 'get_address_book')); + + // use this address book for autocompletion queries + // (maybe this should be configurable by the user?) + $config = rcmail::get_instance()->config; + $sources = (array) $config->get('autocomplete_addressbooks', array('sql')); + if (!in_array($this->abook_id, $sources)) { + $sources[] = $this->abook_id; + $config->set('autocomplete_addressbooks', $sources); + } } - } - - public function address_sources($p) - { - $abook = new example_addressbook_backend($this->abook_name); - $p['sources'][$this->abook_id] = array( - 'id' => $this->abook_id, - 'name' => $this->abook_name, - 'readonly' => $abook->readonly, - 'groups' => $abook->groups, - ); - return $p; - } - - public function get_address_book($p) - { - if ($p['id'] === $this->abook_id) { - $p['instance'] = new example_addressbook_backend($this->abook_name); + + public function address_sources($p) + { + $abook = new example_addressbook_backend($this->abook_name); + + $p['sources'][$this->abook_id] = array( + 'id' => $this->abook_id, + 'name' => $this->abook_name, + 'readonly' => $abook->readonly, + 'groups' => $abook->groups, + ); + + return $p; } - return $p; - } + public function get_address_book($p) + { + if ($p['id'] === $this->abook_id) { + $p['instance'] = new example_addressbook_backend($this->abook_name); + } + return $p; + } } diff --git a/plugins/example_addressbook/example_addressbook_backend.php b/plugins/example_addressbook/example_addressbook_backend.php index c965d5a28..0a380581e 100644 --- a/plugins/example_addressbook/example_addressbook_backend.php +++ b/plugins/example_addressbook/example_addressbook_backend.php @@ -9,108 +9,112 @@ */ class example_addressbook_backend extends rcube_addressbook { - public $primary_key = 'ID'; - public $readonly = true; - public $groups = true; - - private $filter; - private $result; - private $name; - - public function __construct($name) - { - $this->ready = true; - $this->name = $name; - } - - public function get_name() - { - return $this->name; - } - - public function set_search_set($filter) - { - $this->filter = $filter; - } - - public function get_search_set() - { - return $this->filter; - } - - public function reset() - { - $this->result = null; - $this->filter = null; - } - - function list_groups($search = null, $mode = 0) - { - return array( - array('ID' => 'testgroup1', 'name' => "Testgroup"), - array('ID' => 'testgroup2', 'name' => "Sample Group"), - ); - } - - public function list_records($cols=null, $subset=0) - { - $this->result = $this->count(); - $this->result->add(array('ID' => '111', 'name' => "Example Contact", 'firstname' => "Example", 'surname' => "Contact", 'email' => "example@roundcube.net")); - - return $this->result; - } - - public function search($fields, $value, $strict=false, $select=true, $nocount=false, $required=array()) - { - // no search implemented, just list all records - return $this->list_records(); - } - - public function count() - { - return new rcube_result_set(1, ($this->list_page-1) * $this->page_size); - } - - public function get_result() - { - return $this->result; - } - - public function get_record($id, $assoc=false) - { - $this->list_records(); - $first = $this->result->first(); - $sql_arr = $first['ID'] == $id ? $first : null; - - return $assoc && $sql_arr ? $sql_arr : $this->result; - } - - - function create_group($name) - { - $result = false; - - return $result; - } - - function delete_group($gid) - { - return false; - } - - function rename_group($gid, $newname, &$newid) - { - return $newname; - } - - function add_to_group($group_id, $ids) - { - return false; - } - - function remove_from_group($group_id, $ids) - { - return false; - } - + public $primary_key = 'ID'; + public $readonly = true; + public $groups = true; + + private $filter; + private $result; + private $name; + + public function __construct($name) + { + $this->ready = true; + $this->name = $name; + } + + public function get_name() + { + return $this->name; + } + + public function set_search_set($filter) + { + $this->filter = $filter; + } + + public function get_search_set() + { + return $this->filter; + } + + public function reset() + { + $this->result = null; + $this->filter = null; + } + + function list_groups($search = null, $mode = 0) + { + return array( + array('ID' => 'testgroup1', 'name' => "Testgroup"), + array('ID' => 'testgroup2', 'name' => "Sample Group"), + ); + } + + public function list_records($cols = null, $subset = 0) + { + $this->result = $this->count(); + $this->result->add(array( + 'ID' => '111', + 'name' => "Example Contact", + 'firstname' => "Example", + 'surname' => "Contact", + 'email' => "example@roundcube.net" + )); + + return $this->result; + } + + public function search($fields, $value, $strict=false, $select=true, $nocount=false, $required=array()) + { + // no search implemented, just list all records + return $this->list_records(); + } + + public function count() + { + return new rcube_result_set(1, ($this->list_page-1) * $this->page_size); + } + + public function get_result() + { + return $this->result; + } + + public function get_record($id, $assoc = false) + { + $this->list_records(); + $first = $this->result->first(); + $sql_arr = $first['ID'] == $id ? $first : null; + + return $assoc && $sql_arr ? $sql_arr : $this->result; + } + + function create_group($name) + { + $result = false; + + return $result; + } + + function delete_group($gid) + { + return false; + } + + function rename_group($gid, $newname, &$newid) + { + return $newname; + } + + function add_to_group($group_id, $ids) + { + return false; + } + + function remove_from_group($group_id, $ids) + { + return false; + } } diff --git a/plugins/help/help.js b/plugins/help/help.js index 16e1a2a9a..7928b2017 100644 --- a/plugins/help/help.js +++ b/plugins/help/help.js @@ -1,11 +1,10 @@ /** * Help plugin client script - * @version 1.4 * * @licstart The following is the entire license notice for the * JavaScript code in this file. * - * Copyright (c) 2012-2014, The Roundcube Dev Team + * Copyright (c) The Roundcube Dev Team * * The JavaScript code in this page is free software: you can redistribute it * and/or modify it under the terms of the GNU General Public License diff --git a/plugins/help/help.php b/plugins/help/help.php index 352c764df..bd18ec8d4 100644 --- a/plugins/help/help.php +++ b/plugins/help/help.php @@ -8,8 +8,7 @@ * @license GNU GPLv3+ * * Configuration (see config.inc.php.dist) - * - **/ + */ class help extends rcube_plugin { diff --git a/plugins/help/localization/en_US.inc b/plugins/help/localization/en_US.inc index d44b9a886..6aafd24e6 100644 --- a/plugins/help/localization/en_US.inc +++ b/plugins/help/localization/en_US.inc @@ -2,15 +2,13 @@ /* +-----------------------------------------------------------------------+ - | plugins/help/localization/.inc | - | | | Localization file of the Roundcube Webmail Help plugin | - | Copyright (C) 2012-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | | See the README file for a full license statement. | - | | +-----------------------------------------------------------------------+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-help/ diff --git a/plugins/hide_blockquote/hide_blockquote.js b/plugins/hide_blockquote/hide_blockquote.js index e938b33e9..635333a67 100644 --- a/plugins/hide_blockquote/hide_blockquote.js +++ b/plugins/hide_blockquote/hide_blockquote.js @@ -4,7 +4,7 @@ * @licstart The following is the entire license notice for the * JavaScript code in this file. * - * Copyright (c) 2012-2014, The Roundcube Dev Team + * Copyright (c) The Roundcube Dev Team * * The JavaScript code in this page is free software: you can redistribute it * and/or modify it under the terms of the GNU General Public License diff --git a/plugins/hide_blockquote/localization/en_US.inc b/plugins/hide_blockquote/localization/en_US.inc index 90dd28955..782bb59ff 100644 --- a/plugins/hide_blockquote/localization/en_US.inc +++ b/plugins/hide_blockquote/localization/en_US.inc @@ -2,15 +2,13 @@ /* +-----------------------------------------------------------------------+ - | plugins/hide_blockquote/localization/.inc | - | | | Localization file of the Roundcube Webmail Hide-Blockquote plugin | - | Copyright (C) 2012-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | | See the README file for a full license statement. | - | | +-----------------------------------------------------------------------+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-hide_blockquote/ @@ -20,5 +18,3 @@ $labels = array(); $labels['hide'] = 'Hide'; $labels['show'] = 'Show'; $labels['quotelimit'] = 'Hide citation when lines count is greater than'; - -?> diff --git a/plugins/http_authentication/http_authentication.php b/plugins/http_authentication/http_authentication.php index e84cda243..1ec14edff 100644 --- a/plugins/http_authentication/http_authentication.php +++ b/plugins/http_authentication/http_authentication.php @@ -36,12 +36,13 @@ class http_authentication extends rcube_plugin // handle login action if (empty($_SESSION['user_id'])) { - $args['action'] = 'login'; - $this->redirect_query = $_SERVER['QUERY_STRING']; + $args['action'] = 'login'; + $this->redirect_query = $_SERVER['QUERY_STRING']; } // Set user password in session (see shutdown() method for more info) else if (!empty($_SESSION['user_id']) && empty($_SESSION['password']) - && !empty($_SERVER['PHP_AUTH_PW'])) { + && !empty($_SERVER['PHP_AUTH_PW']) + ) { $_SESSION['password'] = $rcmail->encrypt($_SERVER['PHP_AUTH_PW']); } } @@ -55,8 +56,9 @@ class http_authentication extends rcube_plugin $this->load_config(); $host = rcmail::get_instance()->config->get('http_authentication_host'); - if (is_string($host) && trim($host) !== '' && empty($args['host'])) + if (is_string($host) && trim($host) !== '' && empty($args['host'])) { $args['host'] = rcube_utils::idn_to_ascii(rcube_utils::parse_host($host)); + } // Allow entering other user data in login form, // e.g. after log out (#1487953) @@ -66,12 +68,13 @@ class http_authentication extends rcube_plugin if (!empty($_SERVER['PHP_AUTH_USER'])) { $args['user'] = $_SERVER['PHP_AUTH_USER']; - if (!empty($_SERVER['PHP_AUTH_PW'])) + if (!empty($_SERVER['PHP_AUTH_PW'])) { $args['pass'] = $_SERVER['PHP_AUTH_PW']; + } } $args['cookiecheck'] = false; - $args['valid'] = true; + $args['valid'] = true; return $args; } @@ -96,10 +99,11 @@ class http_authentication extends rcube_plugin function login($args) { // Redirect to the previous QUERY_STRING - if($this->redirect_query){ + if ($this->redirect_query) { header('Location: ./?' . $this->redirect_query); exit; } + return $args; } } diff --git a/plugins/managesieve/Changelog b/plugins/managesieve/Changelog index 132764912..f74e4f350 100644 --- a/plugins/managesieve/Changelog +++ b/plugins/managesieve/Changelog @@ -1,3 +1,9 @@ +* version 9.3 [2019-04-21] +----------------------------------------------------------- +- Use RFC-compliant line endings, CRLF instead of LF (#6686) +- Fix bug where global includes were requested for vacation (#6716) +- Fix so "Create filter" option does not show up when Filters menu is disabled (#6723) + * version 9.2 [2018-11-08] ----------------------------------------------------------- - Added support for 'editheader' extension - RFC5293 (#5954) diff --git a/plugins/managesieve/lib/Roundcube/rcube_sieve.php b/plugins/managesieve/lib/Roundcube/rcube_sieve.php index fb610e8da..2ee76615a 100644 --- a/plugins/managesieve/lib/Roundcube/rcube_sieve.php +++ b/plugins/managesieve/lib/Roundcube/rcube_sieve.php @@ -3,8 +3,8 @@ /** * Classes for managesieve operations (using PEAR::Net_Sieve) * - * Copyright (C) 2008-2011, The Roundcube Dev Team - * Copyright (C) 2011, Kolab Systems AG + * Copyright (C) The Roundcube Dev Team + * Copyright (C) Kolab Systems AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -363,21 +363,17 @@ class rcube_sieve */ public function load($name) { - if (!$this->sieve) { - return $this->_set_error(self::ERROR_INTERNAL); - } - - if ($this->current == $name) { + if ($this->current === $name) { return true; } - $script = $this->sieve->getScript($name); + $script = $this->get_script($name); - if (is_a($script, 'PEAR_Error')) { - return $this->_set_error(self::ERROR_OTHER); + if ($script === false) { + return false; } - // try to parse from Roundcube format + // try to parse to Roundcube format $this->script = $this->_parse($script); $this->current = $name; @@ -394,7 +390,7 @@ class rcube_sieve return $this->_set_error(self::ERROR_INTERNAL); } - // try to parse from Roundcube format + // try to parse to Roundcube format $this->script = $this->_parse($script); } diff --git a/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php b/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php index 7788225cb..1dcec48ba 100644 --- a/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php +++ b/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php @@ -5,8 +5,8 @@ * * Engine part of Managesieve plugin implementing UI and backend access. * - * Copyright (C) 2008-2014, The Roundcube Dev Team - * Copyright (C) 2011-2014, Kolab Systems AG + * Copyright (C) The Roundcube Dev Team + * Copyright (C) Kolab Systems AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -34,6 +34,7 @@ class rcube_sieve_engine protected $exts = array(); protected $active = array(); protected $headers = array(); + protected $disabled_actions = array(); protected $addr_headers = array( // Required "from", "to", "cc", "bcc", "sender", "resent-from", "resent-to", @@ -58,9 +59,8 @@ class rcube_sieve_engine 2 => 'notifyimportancenormal', 1 => 'notifyimportancehigh' ); - private $disabled_actions; - const VERSION = '9.2'; + const VERSION = '9.3'; const PROGNAME = 'Roundcube (Managesieve)'; const PORT = 4190; @@ -89,7 +89,7 @@ class rcube_sieve_engine 'filterseteditraw' => array($this, 'filterset_editraw'), )); - $this->disabled_actions = $this->rc->config->get('managesieve_disabled_actions', array()); + $this->disabled_actions = (array) $this->rc->config->get('managesieve_disabled_actions'); // connect to managesieve server $error = $this->connect($_SESSION['username'], $this->rc->decrypt($_SESSION['password'])); diff --git a/plugins/managesieve/lib/Roundcube/rcube_sieve_forward.php b/plugins/managesieve/lib/Roundcube/rcube_sieve_forward.php index 967cb1622..db1c1b653 100644 --- a/plugins/managesieve/lib/Roundcube/rcube_sieve_forward.php +++ b/plugins/managesieve/lib/Roundcube/rcube_sieve_forward.php @@ -5,7 +5,7 @@ * * Engine part of Managesieve plugin implementing UI and backend access. * - * Copyright (C) 2011-2017, Kolab Systems AG + * Copyright (C) Kolab Systems AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php b/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php index fdfbf6e25..4b70b5ee7 100644 --- a/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php +++ b/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php @@ -3,8 +3,8 @@ /** * Class for operations on Sieve scripts * - * Copyright (C) 2008-2011, The Roundcube Dev Team - * Copyright (C) 2011, Kolab Systems AG + * Copyright (C) The Roundcube Dev Team + * Copyright (C) Kolab Systems AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -196,14 +196,14 @@ class rcube_sieve_script foreach ($this->vars as $var) { if (empty($has_vars)) { // 'variables' extension not supported, put vars in comments - $output .= sprintf("# %s %s\n", $var['name'], $var['value']); + $output .= sprintf("# %s %s\r\n", $var['name'], $var['value']); } else { $output .= 'set '; foreach (array_diff(array_keys($var), array('name', 'value')) as $opt) { $output .= ":$opt "; } - $output .= self::escape_string($var['name']) . ' ' . self::escape_string($var['value']) . ";\n"; + $output .= self::escape_string($var['name']) . ' ' . self::escape_string($var['value']) . ";\r\n"; } } } @@ -219,7 +219,7 @@ class rcube_sieve_script // header if (!empty($rule['name']) && strlen($rule['name'])) { - $script .= '# rule:[' . $rule['name'] . "]\n"; + $script .= '# rule:[' . $rule['name'] . "]\r\n"; } // constraints expressions @@ -379,7 +379,7 @@ class rcube_sieve_script else { $script .= $tests_str; } - $script .= "\n{\n"; + $script .= "\r\n{\r\n"; } // action(s) @@ -548,13 +548,13 @@ class rcube_sieve_script if ($action_script) { $script .= !empty($tests) ? "\t" : ''; - $script .= $action_script . ";\n"; + $script .= $action_script . ";\r\n"; } } } if ($script) { - $output .= $script . (!empty($tests) ? "}\n" : ''); + $output .= $script . (!empty($tests) ? "}\r\n" : ''); $idx++; } } @@ -569,11 +569,11 @@ class rcube_sieve_script sort($exts); // for convenience use always the same order - $output = 'require ["' . implode('","', $exts) . "\"];\n" . $output; + $output = 'require ["' . implode('","', $exts) . "\"];\r\n" . $output; } if (!empty($this->prefix)) { - $output = $this->prefix . "\n\n" . $output; + $output = $this->prefix . "\r\n\r\n" . $output; } return $output; @@ -678,7 +678,7 @@ class rcube_sieve_script } if (!empty($prefix)) { - $this->prefix = trim($prefix); + $this->prefix = trim(preg_replace('/\r?\n/', "\r\n", $prefix)); } } @@ -1203,7 +1203,7 @@ class rcube_sieve_script // multi-line string if (preg_match('/[\r\n\0]/', $str)) { - return sprintf("text:\n%s\n.\n", self::escape_multiline_string($str)); + return sprintf("text:\r\n%s\r\n.\r\n", self::escape_multiline_string($str)); } // quoted-string else { @@ -1394,7 +1394,7 @@ class rcube_sieve_script // remove dot-stuffing $text = str_replace("\n..", "\n.", $text); - $result[] = $text; + $result[] = rtrim($text, "\r\n"); $position++; } } diff --git a/plugins/managesieve/lib/Roundcube/rcube_sieve_vacation.php b/plugins/managesieve/lib/Roundcube/rcube_sieve_vacation.php index 5fcbfb3f0..43ce9fc97 100644 --- a/plugins/managesieve/lib/Roundcube/rcube_sieve_vacation.php +++ b/plugins/managesieve/lib/Roundcube/rcube_sieve_vacation.php @@ -5,7 +5,7 @@ * * Engine part of Managesieve plugin implementing UI and backend access. * - * Copyright (C) 2011-2014, Kolab Systems AG + * Copyright (C) Kolab Systems AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -72,12 +72,13 @@ class rcube_sieve_vacation extends rcube_sieve_engine if ($this->sieve->load($script)) { foreach ($this->sieve->script->as_array() as $rule) { if (!empty($rule['actions'])) { - if ($rule['actions'][0]['type'] == 'vacation') { + $action = $rule['actions'][0]; + if ($action['type'] == 'vacation') { $this->script_name = $script; return 0; } - else if (empty($master) && $rule['actions'][0]['type'] == 'include') { - $included[] = $rule['actions'][0]['target']; + else if (empty($master) && empty($action['global']) && $action['type'] == 'include') { + $included[] = $action['target']; } } } diff --git a/plugins/managesieve/localization/en_US.inc b/plugins/managesieve/localization/en_US.inc index ebc78aa00..0ab602ce5 100644 --- a/plugins/managesieve/localization/en_US.inc +++ b/plugins/managesieve/localization/en_US.inc @@ -2,15 +2,13 @@ /* +-----------------------------------------------------------------------+ - | plugins/managesieve/localization/.inc | - | | | Localization file of the Roundcube Webmail Managesieve plugin | - | Copyright (C) 2012-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | | See the README file for a full license statement. | - | | +-----------------------------------------------------------------------+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-managesieve/ @@ -277,5 +275,3 @@ $messages['emptyvacationbody'] = 'Body of vacation message is required!'; $messages['duplicate.conflict.err'] = 'Both header and unique identifier are not allowed.'; $messages['disabledaction'] = 'Action not permitted.'; $messages['lastindexempty'] = 'Index is required when counting from end'; - -?> diff --git a/plugins/managesieve/managesieve.js b/plugins/managesieve/managesieve.js index 6afc25409..874856d31 100644 --- a/plugins/managesieve/managesieve.js +++ b/plugins/managesieve/managesieve.js @@ -4,7 +4,7 @@ * @licstart The following is the entire license notice for the * JavaScript code in this file. * - * Copyright (c) 2012-2014, The Roundcube Dev Team + * Copyright (c) The Roundcube Dev Team * * The JavaScript code in this page is free software: you can redistribute it * and/or modify it under the terms of the GNU General Public License @@ -980,7 +980,7 @@ function sieve_form_init() parent.rcmail.managesieve_dialog_resize(form); } - $('input[type="text"]:first', form).focus(); + $('input[type="text"]', form).first().focus(); // initialize smart list inputs $('textarea[data-type="list"]', form).each(function() { @@ -1189,7 +1189,7 @@ rcube_webmail.prototype.managesieve_dialog_resize = function(o) { var dialog = this.env.managesieve_dialog, win = $(window), form = $(o); - width = $('fieldset:first', o).width(), // fieldset width is more appropriate here + width = $('fieldset', o).first().width(), // fieldset width is more appropriate here height = form.height(), w = win.width(), h = win.height(); diff --git a/plugins/managesieve/managesieve.php b/plugins/managesieve/managesieve.php index 8c1395044..4d6d99c08 100644 --- a/plugins/managesieve/managesieve.php +++ b/plugins/managesieve/managesieve.php @@ -11,8 +11,8 @@ * * Configuration (see config.inc.php.dist) * - * Copyright (C) 2008-2013, The Roundcube Dev Team - * Copyright (C) 2011-2013, Kolab Systems AG + * Copyright (C) The Roundcube Dev Team + * Copyright (C) Kolab Systems AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -156,8 +156,12 @@ class managesieve extends rcube_plugin return; } - // use jQuery for popup window - $this->require_plugin('jqueryui'); + $vacation_mode = (int) $this->rc->config->get('managesieve_vacation'); + $forward_mode = (int) $this->rc->config->get('managesieve_forward'); + + if ($vacation_mode == 2 || $forward_mode == 2) { + return; + } // include js script and localization $this->init_ui(); diff --git a/plugins/managesieve/tests/Tokenizer.php b/plugins/managesieve/tests/Tokenizer.php index f50ed75b7..f40901594 100644 --- a/plugins/managesieve/tests/Tokenizer.php +++ b/plugins/managesieve/tests/Tokenizer.php @@ -12,11 +12,13 @@ class Tokenizer extends PHPUnit_Framework_TestCase { return array( array(1, "text: #test\nThis is test ; message;\nMulti line\n.\n;\n", '"This is test ; message;\nMulti line"'), + array(1, "text: #test\r\nThis is test ; message;\nMulti line\r\n.\r\n;", '"This is test ; message;\nMulti line"'), array(0, '["test1","test2"]', '[["test1","test2"]]'), array(1, '["test"]', '["test"]'), array(1, '"te\\"st"', '"te\\"st"'), array(0, 'test #comment', '["test"]'), array(0, "text:\ntest\n.\ntext:\ntest\n.\n", '["test","test"]'), + array(0, "text:\r\ntest\r\n.\r\ntext:\r\ntest\r\n.\r\n", '["test","test"]'), array(1, '"\\a\\\\\\"a"', '"a\\\\\\"a"'), ); } diff --git a/plugins/managesieve/tests/Vacation.php b/plugins/managesieve/tests/Vacation.php index 942525c2f..81587cf10 100644 --- a/plugins/managesieve/tests/Vacation.php +++ b/plugins/managesieve/tests/Vacation.php @@ -63,4 +63,3 @@ class Managesieve_Vacation extends PHPUnit_Framework_TestCase $this->assertSame('05 Mar 2014', $result['to']); } } - diff --git a/plugins/managesieve/tests/src/parser.out b/plugins/managesieve/tests/src/parser.out index 45712d036..a667f1b28 100644 --- a/plugins/managesieve/tests/src/parser.out +++ b/plugins/managesieve/tests/src/parser.out @@ -1,58 +1,58 @@ -require ["envelope","fileinto","reject"]; -# rule:[spam] -if header :contains "X-DSPAM-Result" "Spam" -{ - fileinto "Spam"; - stop; -} -# rule:[test1] -if header :contains ["From","To"] "test@domain.tld" -{ - discard; - stop; -} -# rule:[test2] -if anyof (not header :contains :comparator "i;octet" "Subject" "[test]", header :contains "Subject" "[test2]") -{ - fileinto "test"; - stop; -} -# rule:[comments] -if true -{ - stop; -} -# rule:[reject] -if size :over 5000K -{ - reject "Message over 5MB size limit. Please contact me before sending this."; -} -# rule:[false] -if false # size :over 5000K -{ - stop; -} -# rule:[true] -if true -{ - stop; -} -fileinto "Test"; -# rule:[address test] -if address :is "From" "nagios@domain.tld" -{ - fileinto "domain.tld"; - stop; -} -# rule:[envelope test] -if envelope :domain :is "From" "domain.tld" -{ - fileinto "domain.tld"; - stop; -} -# rule:[do not wrap long lines] -if envelope :domain :is "From" "1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" -{ - fileinto "domain.tld"; - stop; -} +require ["envelope","fileinto","reject"]; +# rule:[spam] +if header :contains "X-DSPAM-Result" "Spam" +{ + fileinto "Spam"; + stop; +} +# rule:[test1] +if header :contains ["From","To"] "test@domain.tld" +{ + discard; + stop; +} +# rule:[test2] +if anyof (not header :contains :comparator "i;octet" "Subject" "[test]", header :contains "Subject" "[test2]") +{ + fileinto "test"; + stop; +} +# rule:[comments] +if true +{ + stop; +} +# rule:[reject] +if size :over 5000K +{ + reject "Message over 5MB size limit. Please contact me before sending this."; +} +# rule:[false] +if false # size :over 5000K +{ + stop; +} +# rule:[true] +if true +{ + stop; +} +fileinto "Test"; +# rule:[address test] +if address :is "From" "nagios@domain.tld" +{ + fileinto "domain.tld"; + stop; +} +# rule:[envelope test] +if envelope :domain :is "From" "domain.tld" +{ + fileinto "domain.tld"; + stop; +} +# rule:[do not wrap long lines] +if envelope :domain :is "From" "1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" +{ + fileinto "domain.tld"; + stop; +} diff --git a/plugins/managesieve/tests/src/parser_body b/plugins/managesieve/tests/src/parser_body index bd142ed8c..504d5c4f2 100644 --- a/plugins/managesieve/tests/src/parser_body +++ b/plugins/managesieve/tests/src/parser_body @@ -1,17 +1,17 @@ -require ["body","fileinto"]; -if body :raw :contains "MAKE MONEY FAST" -{ - stop; -} -if body :content "text" :contains ["missile","coordinates"] -{ - fileinto "secrets"; -} -if body :content "audio/mp3" :contains "" -{ - fileinto "jukebox"; -} -if body :text :contains "project schedule" -{ - fileinto "project/schedule"; -} +require ["body","fileinto"]; +if body :raw :contains "MAKE MONEY FAST" +{ + stop; +} +if body :content "text" :contains ["missile","coordinates"] +{ + fileinto "secrets"; +} +if body :content "audio/mp3" :contains "" +{ + fileinto "jukebox"; +} +if body :text :contains "project schedule" +{ + fileinto "project/schedule"; +} diff --git a/plugins/managesieve/tests/src/parser_comments.out b/plugins/managesieve/tests/src/parser_comments.out index 677783622..2c2d7e16b 100644 --- a/plugins/managesieve/tests/src/parser_comments.out +++ b/plugins/managesieve/tests/src/parser_comments.out @@ -1,10 +1,10 @@ -require ["envelope","fileinto","imap4flags","subaddress"]; -if envelope :detail "to" "addressextension" -{ - setflag "\\Flagged"; -} -if header :is "X-Spam-Flag" "YES" -{ - fileinto "Junk"; - stop; -} +require ["envelope","fileinto","imap4flags","subaddress"]; +if envelope :detail "to" "addressextension" +{ + setflag "\\Flagged"; +} +if header :is "X-Spam-Flag" "YES" +{ + fileinto "Junk"; + stop; +} diff --git a/plugins/managesieve/tests/src/parser_date b/plugins/managesieve/tests/src/parser_date index 06b00333f..9d33e75f2 100644 --- a/plugins/managesieve/tests/src/parser_date +++ b/plugins/managesieve/tests/src/parser_date @@ -1,21 +1,21 @@ -require ["comparator-i;ascii-numeric","date","fileinto","relational"]; -# rule:[date] -if allof (date :originalzone :value "ge" :comparator "i;ascii-numeric" "date" "hour" "09") -{ - fileinto "urgent"; -} -# rule:[date-weekday] -if date :is "received" "weekday" "0" -{ - fileinto "weekend"; -} -# rule:[date-zone] -if date :zone "-0500" :value "gt" :comparator "i;ascii-numeric" "received" "iso8601" "2007-02-26T09:00:00-05:00" -{ - stop; -} -# rule:[currentdate] -if anyof (currentdate :is "weekday" "0", currentdate :value "lt" :comparator "i;ascii-numeric" "hour" "09", currentdate :value "ge" :comparator "i;ascii-numeric" "date" "2007-06-30") -{ - stop; -} +require ["comparator-i;ascii-numeric","date","fileinto","relational"]; +# rule:[date] +if allof (date :originalzone :value "ge" :comparator "i;ascii-numeric" "date" "hour" "09") +{ + fileinto "urgent"; +} +# rule:[date-weekday] +if date :is "received" "weekday" "0" +{ + fileinto "weekend"; +} +# rule:[date-zone] +if date :zone "-0500" :value "gt" :comparator "i;ascii-numeric" "received" "iso8601" "2007-02-26T09:00:00-05:00" +{ + stop; +} +# rule:[currentdate] +if anyof (currentdate :is "weekday" "0", currentdate :value "lt" :comparator "i;ascii-numeric" "hour" "09", currentdate :value "ge" :comparator "i;ascii-numeric" "date" "2007-06-30") +{ + stop; +} diff --git a/plugins/managesieve/tests/src/parser_duplicate b/plugins/managesieve/tests/src/parser_duplicate index 4d10d772c..199024cd7 100644 --- a/plugins/managesieve/tests/src/parser_duplicate +++ b/plugins/managesieve/tests/src/parser_duplicate @@ -1,16 +1,16 @@ -require ["duplicate","fileinto"]; -# rule:[test-duplicate] -if duplicate -{ - fileinto "urgent"; -} -# rule:[test-duplicate-2] -if allof (duplicate :handle "support" :header "X-Ticket-ID", header :contains "subject" "fileserver") -{ - fileinto "test"; -} -# rule:[test-duplicate-3] -if not duplicate :uniqueid "test" :seconds 1800 -{ - discard; -} +require ["duplicate","fileinto"]; +# rule:[test-duplicate] +if duplicate +{ + fileinto "urgent"; +} +# rule:[test-duplicate-2] +if allof (duplicate :handle "support" :header "X-Ticket-ID", header :contains "subject" "fileserver") +{ + fileinto "test"; +} +# rule:[test-duplicate-3] +if not duplicate :uniqueid "test" :seconds 1800 +{ + discard; +} diff --git a/plugins/managesieve/tests/src/parser_editheader b/plugins/managesieve/tests/src/parser_editheader index ed713a53e..f9638a605 100644 --- a/plugins/managesieve/tests/src/parser_editheader +++ b/plugins/managesieve/tests/src/parser_editheader @@ -1,36 +1,36 @@ -require ["editheader"]; -# rule:[test-addheader1] -if true -{ - addheader "X-Sieve-Filtered" ""; -} -# rule:[test-addheader2] -if not header :contains "X-Sieve-Filtered" "" -{ - addheader :last "X-Sieve-Filtered" ""; -} -# rule:[test-deleteheader1] -if true -{ - deleteheader :index 1 :contains "Delivered-To" ["bob@example.com","test@test.com"]; -} -# rule:[test-deleteheader2] -if true -{ - deleteheader :index 2 :last :contains :comparator "i;octet" "Delivered-To" "test@test.com"; -} -# rule:[test-deleteheader3] -if true -{ - deleteheader "Delivered-To"; -} -# rule:[test-deleteheader4] -if true -{ - deleteheader :index 3 :last :contains "Delivered-To"; -} -# rule:[test-deleteheader5] -if true -{ - deleteheader "Delivered-To" "test"; -} +require ["editheader"]; +# rule:[test-addheader1] +if true +{ + addheader "X-Sieve-Filtered" ""; +} +# rule:[test-addheader2] +if not header :contains "X-Sieve-Filtered" "" +{ + addheader :last "X-Sieve-Filtered" ""; +} +# rule:[test-deleteheader1] +if true +{ + deleteheader :index 1 :contains "Delivered-To" ["bob@example.com","test@test.com"]; +} +# rule:[test-deleteheader2] +if true +{ + deleteheader :index 2 :last :contains :comparator "i;octet" "Delivered-To" "test@test.com"; +} +# rule:[test-deleteheader3] +if true +{ + deleteheader "Delivered-To"; +} +# rule:[test-deleteheader4] +if true +{ + deleteheader :index 3 :last :contains "Delivered-To"; +} +# rule:[test-deleteheader5] +if true +{ + deleteheader "Delivered-To" "test"; +} diff --git a/plugins/managesieve/tests/src/parser_enotify_a b/plugins/managesieve/tests/src/parser_enotify_a index 68a9ef5cc..e61ea45f2 100644 --- a/plugins/managesieve/tests/src/parser_enotify_a +++ b/plugins/managesieve/tests/src/parser_enotify_a @@ -1,19 +1,18 @@ -require ["enotify","variables"]; -# rule:[notify1] -if header :contains "from" "boss@example.org" -{ - notify :importance "1" :message "This is probably very important" "mailto:alm@example.com"; - stop; -} -# rule:[subject] -if header :matches "Subject" "*" -{ - set "subject" "${1}"; -} -# rule:[from notify2] -if header :matches "From" "*" -{ - set "from" "${1}"; - notify :importance "3" :message "${from}: ${subject}" "mailto:alm@example.com"; -} - +require ["enotify","variables"]; +# rule:[notify1] +if header :contains "from" "boss@example.org" +{ + notify :importance "1" :message "This is probably very important" "mailto:alm@example.com"; + stop; +} +# rule:[subject] +if header :matches "Subject" "*" +{ + set "subject" "${1}"; +} +# rule:[from notify2] +if header :matches "From" "*" +{ + set "from" "${1}"; + notify :importance "3" :message "${from}: ${subject}" "mailto:alm@example.com"; +} diff --git a/plugins/managesieve/tests/src/parser_enotify_b b/plugins/managesieve/tests/src/parser_enotify_b index a3011bac2..eb3c84749 100644 --- a/plugins/managesieve/tests/src/parser_enotify_b +++ b/plugins/managesieve/tests/src/parser_enotify_b @@ -1,18 +1,18 @@ -require ["enotify","envelope","variables"]; -# rule:[from] -if envelope :matches "from" "*" -{ - set "env_from" " [really: ${1}]"; -} -# rule:[subject] -if header :matches "Subject" "*" -{ - set "subject" "${1}"; -} -# rule:[from notify] -if address :matches "from" "*" -{ - set "from_addr" "${1}"; - notify :message "${from_addr}${env_from}: ${subject}" "mailto:alm@example.com"; -} +require ["enotify","envelope","variables"]; +# rule:[from] +if envelope :matches "from" "*" +{ + set "env_from" " [really: ${1}]"; +} +# rule:[subject] +if header :matches "Subject" "*" +{ + set "subject" "${1}"; +} +# rule:[from notify] +if address :matches "from" "*" +{ + set "from_addr" "${1}"; + notify :message "${from_addr}${env_from}: ${subject}" "mailto:alm@example.com"; +} diff --git a/plugins/managesieve/tests/src/parser_imapflags b/plugins/managesieve/tests/src/parser_imapflags index e67bf7cfc..7128f1ebb 100644 --- a/plugins/managesieve/tests/src/parser_imapflags +++ b/plugins/managesieve/tests/src/parser_imapflags @@ -1,7 +1,7 @@ -require ["imap4flags"]; -# rule:[imapflags] -if header :matches "Subject" "^Test$" -{ - setflag "\\Seen"; - addflag ["\\Answered","\\Deleted"]; -} +require ["imap4flags"]; +# rule:[imapflags] +if header :matches "Subject" "^Test$" +{ + setflag "\\Seen"; + addflag ["\\Answered","\\Deleted"]; +} diff --git a/plugins/managesieve/tests/src/parser_include b/plugins/managesieve/tests/src/parser_include index b5585a4ba..c11d1c5e5 100644 --- a/plugins/managesieve/tests/src/parser_include +++ b/plugins/managesieve/tests/src/parser_include @@ -1,7 +1,7 @@ -require ["include"]; -include "script.sieve"; -# rule:[two] -if true -{ - include :optional "second.sieve"; -} +require ["include"]; +include "script.sieve"; +# rule:[two] +if true +{ + include :optional "second.sieve"; +} diff --git a/plugins/managesieve/tests/src/parser_index b/plugins/managesieve/tests/src/parser_index index ca9f86d56..4d4f52092 100644 --- a/plugins/managesieve/tests/src/parser_index +++ b/plugins/managesieve/tests/src/parser_index @@ -1,24 +1,24 @@ -require ["comparator-i;ascii-numeric","date","fileinto","index","relational"]; -# rule:[index-header1] -if header :index 1 :last :contains "X-DSPAM-Result" "Spam" -{ - fileinto "Spam"; - stop; -} -# rule:[index-header2] -if header :index 2 :contains ["From","To"] "test@domain.tld" -{ - discard; - stop; -} -# rule:[index-address] -if address :index 1 :is "From" "nagios@domain.tld" -{ - fileinto "domain.tld"; - stop; -} -# rule:[index-date] -if date :index 1 :last :zone "-0500" :value "gt" :comparator "i;ascii-numeric" "received" "iso8601" "2007-02-26T09:00:00-05:00" -{ - stop; -} +require ["comparator-i;ascii-numeric","date","fileinto","index","relational"]; +# rule:[index-header1] +if header :index 1 :last :contains "X-DSPAM-Result" "Spam" +{ + fileinto "Spam"; + stop; +} +# rule:[index-header2] +if header :index 2 :contains ["From","To"] "test@domain.tld" +{ + discard; + stop; +} +# rule:[index-address] +if address :index 1 :is "From" "nagios@domain.tld" +{ + fileinto "domain.tld"; + stop; +} +# rule:[index-date] +if date :index 1 :last :zone "-0500" :value "gt" :comparator "i;ascii-numeric" "received" "iso8601" "2007-02-26T09:00:00-05:00" +{ + stop; +} diff --git a/plugins/managesieve/tests/src/parser_kep14.out b/plugins/managesieve/tests/src/parser_kep14.out index cb7faa7f8..b19ffb7b7 100644 --- a/plugins/managesieve/tests/src/parser_kep14.out +++ b/plugins/managesieve/tests/src/parser_kep14.out @@ -1,3 +1,3 @@ -require ["variables"]; -set "EDITOR" "Roundcube"; -set "EDITOR_VERSION" "123"; +require ["variables"]; +set "EDITOR" "Roundcube"; +set "EDITOR_VERSION" "123"; diff --git a/plugins/managesieve/tests/src/parser_nesting.out b/plugins/managesieve/tests/src/parser_nesting.out index 7384f757b..19b589a63 100644 --- a/plugins/managesieve/tests/src/parser_nesting.out +++ b/plugins/managesieve/tests/src/parser_nesting.out @@ -1,10 +1,10 @@ -# Sieve Filter -# Erzeugt von Ingo (http://www.horde.org/ingo/) (30.09.2016, 16:02) -# Nested rules aren't supported and will be ignored (#5540) - -# rule:[Ausgeschlossene Adressen] -if address :is ["From","Sender","Resent-From"] "noreply@example.org" -{ - discard; - stop; -} +# Sieve Filter +# Erzeugt von Ingo (http://www.horde.org/ingo/) (30.09.2016, 16:02) +# Nested rules aren't supported and will be ignored (#5540) + +# rule:[Ausgeschlossene Adressen] +if address :is ["From","Sender","Resent-From"] "noreply@example.org" +{ + discard; + stop; +} diff --git a/plugins/managesieve/tests/src/parser_notify_a b/plugins/managesieve/tests/src/parser_notify_a index e51e2aa8d..fc9940c4b 100644 --- a/plugins/managesieve/tests/src/parser_notify_a +++ b/plugins/managesieve/tests/src/parser_notify_a @@ -1,18 +1,18 @@ -require ["notify","variables"]; -# rule:[notify1] -if header :contains "from" "boss@example.org" -{ - notify :low :message "This is probably very important"; - stop; -} -# rule:[subject] -if header :matches "Subject" "*" -{ - set "subject" "${1}"; -} -# rule:[from notify2] -if header :matches "From" "*" -{ - set "from" "${1}"; - notify :high :method "mailto" :options "test@example.org" :message "${from}: ${subject}"; -} +require ["notify","variables"]; +# rule:[notify1] +if header :contains "from" "boss@example.org" +{ + notify :low :message "This is probably very important"; + stop; +} +# rule:[subject] +if header :matches "Subject" "*" +{ + set "subject" "${1}"; +} +# rule:[from notify2] +if header :matches "From" "*" +{ + set "from" "${1}"; + notify :high :method "mailto" :options "test@example.org" :message "${from}: ${subject}"; +} diff --git a/plugins/managesieve/tests/src/parser_notify_b b/plugins/managesieve/tests/src/parser_notify_b index f942e155f..97adb646c 100644 --- a/plugins/managesieve/tests/src/parser_notify_b +++ b/plugins/managesieve/tests/src/parser_notify_b @@ -1,17 +1,17 @@ -require ["envelope","notify","variables"]; -# rule:[from] -if envelope :matches "from" "*" -{ - set "env_from" " [really: ${1}]"; -} -# rule:[subject] -if header :matches "Subject" "*" -{ - set "subject" "${1}"; -} -# rule:[from notify] -if address :matches "from" "*" -{ - set "from_addr" "${1}"; - notify :method "sms" :options "1234567890" :message "${from_addr}${env_from}: ${subject}"; -} +require ["envelope","notify","variables"]; +# rule:[from] +if envelope :matches "from" "*" +{ + set "env_from" " [really: ${1}]"; +} +# rule:[subject] +if header :matches "Subject" "*" +{ + set "subject" "${1}"; +} +# rule:[from notify] +if address :matches "from" "*" +{ + set "from_addr" "${1}"; + notify :method "sms" :options "1234567890" :message "${from_addr}${env_from}: ${subject}"; +} diff --git a/plugins/managesieve/tests/src/parser_prefix b/plugins/managesieve/tests/src/parser_prefix index 9f6a33a1c..66c5a42bf 100644 --- a/plugins/managesieve/tests/src/parser_prefix +++ b/plugins/managesieve/tests/src/parser_prefix @@ -1,5 +1,5 @@ -# this is a comment -# and the second line - -require ["variables"]; -set "b" "c"; +# this is a comment +# and the second line + +require ["variables"]; +set "b" "c"; diff --git a/plugins/managesieve/tests/src/parser_relational b/plugins/managesieve/tests/src/parser_relational index 92c5e1a8e..37de64299 100644 --- a/plugins/managesieve/tests/src/parser_relational +++ b/plugins/managesieve/tests/src/parser_relational @@ -1,6 +1,6 @@ -require ["comparator-i;ascii-numeric","relational"]; -# rule:[redirect] -if header :value "ge" :comparator "i;ascii-numeric" "X-Spam-score" "14" -{ - redirect "test@test.tld"; -} +require ["comparator-i;ascii-numeric","relational"]; +# rule:[redirect] +if header :value "ge" :comparator "i;ascii-numeric" "X-Spam-score" "14" +{ + redirect "test@test.tld"; +} diff --git a/plugins/managesieve/tests/src/parser_subaddress b/plugins/managesieve/tests/src/parser_subaddress index e44555096..c1e3e2b37 100644 --- a/plugins/managesieve/tests/src/parser_subaddress +++ b/plugins/managesieve/tests/src/parser_subaddress @@ -1,11 +1,11 @@ -require ["envelope","fileinto","subaddress"]; -if envelope :user "To" "postmaster" -{ - fileinto "postmaster"; - stop; -} -if envelope :detail :is "To" "mta-filters" -{ - fileinto "mta-filters"; - stop; -} +require ["envelope","fileinto","subaddress"]; +if envelope :user "To" "postmaster" +{ + fileinto "postmaster"; + stop; +} +if envelope :detail :is "To" "mta-filters" +{ + fileinto "mta-filters"; + stop; +} diff --git a/plugins/managesieve/tests/src/parser_vacation b/plugins/managesieve/tests/src/parser_vacation index 8603d37c4..8567389dd 100644 --- a/plugins/managesieve/tests/src/parser_vacation +++ b/plugins/managesieve/tests/src/parser_vacation @@ -1,14 +1,14 @@ -require ["vacation"]; -# rule:[test-vacation] -if header :contains "Subject" "vacation" -{ - vacation :days 1 text: -# test -test test /* test */ -.. -..test -test -. -; - stop; -} +require ["vacation"]; +# rule:[test-vacation] +if header :contains "Subject" "vacation" +{ + vacation :days 1 text: +# test +test test /* test */ +.. +..test +test +. +; + stop; +} diff --git a/plugins/managesieve/tests/src/parser_vacation_seconds b/plugins/managesieve/tests/src/parser_vacation_seconds index 75cbcae46..f7543f7b7 100644 --- a/plugins/managesieve/tests/src/parser_vacation_seconds +++ b/plugins/managesieve/tests/src/parser_vacation_seconds @@ -1,12 +1,12 @@ -require ["vacation-seconds"]; -# rule:[test-vacation] -if header :contains "Subject" "vacation" -{ - vacation :seconds 0 text: -# test -test test /* test */ -test -. -; - stop; -} +require ["vacation-seconds"]; +# rule:[test-vacation] +if header :contains "Subject" "vacation" +{ + vacation :seconds 0 text: +# test +test test /* test */ +test +. +; + stop; +} diff --git a/plugins/managesieve/tests/src/parser_variables b/plugins/managesieve/tests/src/parser_variables index c4ea2f72a..4dcee7c4c 100644 --- a/plugins/managesieve/tests/src/parser_variables +++ b/plugins/managesieve/tests/src/parser_variables @@ -1,24 +1,24 @@ -require ["variables"]; -set "honorific" "Mr"; -set "vacation" text: -Dear ${HONORIFIC} ${last_name}, -I am out, please leave a message after the meep. -. -; -set :length "b" "${a}"; -set :lower "b" "${a}"; -set :upperfirst "b" "${a}"; -set :upperfirst :lower "b" "${a}"; -set :quotewildcard "b" "Rock*"; -if string :matches " ${state} " "* pending *" -{ - set "test1" "*"; -} -if string ["aaa","bbb"] ["aaa","bbb"] -{ - set "test2" "*"; -} -if string :is :comparator "i;octet" "bbb" "bbb" -{ - set "test3" "*"; -} +require ["variables"]; +set "honorific" "Mr"; +set "vacation" text: +Dear ${HONORIFIC} ${last_name}, +I am out, please leave a message after the meep. +. +; +set :length "b" "${a}"; +set :lower "b" "${a}"; +set :upperfirst "b" "${a}"; +set :upperfirst :lower "b" "${a}"; +set :quotewildcard "b" "Rock*"; +if string :matches " ${state} " "* pending *" +{ + set "test1" "*"; +} +if string ["aaa","bbb"] ["aaa","bbb"] +{ + set "test2" "*"; +} +if string :is :comparator "i;octet" "bbb" "bbb" +{ + set "test3" "*"; +} diff --git a/plugins/markasjunk/localization/en_US.inc b/plugins/markasjunk/localization/en_US.inc index 9f9e5fd3f..b6ad8bc46 100644 --- a/plugins/markasjunk/localization/en_US.inc +++ b/plugins/markasjunk/localization/en_US.inc @@ -2,15 +2,13 @@ /* +-----------------------------------------------------------------------+ - | plugins/markasjunk/localization/.inc | - | | | Localization file of the Roundcube Webmail Mark-As-Junk plugin | - | Copyright (C) 2012-2018, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | | See the README file for a full license statement. | - | | +-----------------------------------------------------------------------+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-markasjunk/ diff --git a/plugins/markasjunk/markasjunk.js b/plugins/markasjunk/markasjunk.js index 964cae8bb..378bb305f 100644 --- a/plugins/markasjunk/markasjunk.js +++ b/plugins/markasjunk/markasjunk.js @@ -4,8 +4,8 @@ * @licstart The following is the entire license notice for the * JavaScript code in this file. * - * Copyright (c) 2013-2018 The Roundcube Dev Team - * Copyright (C) 2009-2018 Philip Weir + * Copyright (c) The Roundcube Dev Team + * Copyright (C) Philip Weir * * The JavaScript code in this page is free software: you can redistribute it * and/or modify it under the terms of the GNU General Public License diff --git a/plugins/markasjunk/markasjunk.php b/plugins/markasjunk/markasjunk.php index dea5d6fdb..303f8e8cf 100644 --- a/plugins/markasjunk/markasjunk.php +++ b/plugins/markasjunk/markasjunk.php @@ -11,8 +11,8 @@ * @author Philip Weir * @author Thomas Bruederli * - * Copyright (C) 2009-2018 The Roundcube Dev Team - * Copyright (C) 2009-2018 Philip Weir + * Copyright (C) The Roundcube Dev Team + * Copyright (C) Philip Weir * * This program is a Roundcube (https://roundcube.net) plugin. * For more information see README.md. diff --git a/plugins/new_user_dialog/localization/en_US.inc b/plugins/new_user_dialog/localization/en_US.inc index d508cfc9c..f0445108b 100644 --- a/plugins/new_user_dialog/localization/en_US.inc +++ b/plugins/new_user_dialog/localization/en_US.inc @@ -2,15 +2,13 @@ /* +-----------------------------------------------------------------------+ - | plugins/new_user_dialog/localization/.inc | - | | | Localization file of the Roundcube Webmail New User Dialog plugin | - | Copyright (C) 2012-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | | See the README file for a full license statement. | - | | +-----------------------------------------------------------------------+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-new_user_dialog/ @@ -19,5 +17,3 @@ $labels = array(); $labels['identitydialogtitle'] = 'Please complete your sender identity'; $labels['identitydialoghint'] = 'This box only appears once at the first login.'; - -?> \ No newline at end of file diff --git a/plugins/newmail_notifier/localization/en_US.inc b/plugins/newmail_notifier/localization/en_US.inc index 1c4054615..c244b3ae2 100644 --- a/plugins/newmail_notifier/localization/en_US.inc +++ b/plugins/newmail_notifier/localization/en_US.inc @@ -2,15 +2,13 @@ /* +-----------------------------------------------------------------------+ - | plugins/newmail_notifier/localization/.inc | - | | | Localization file of the Roundcube Webmail New Mail Notifier plugin | - | Copyright (C) 2012-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | | See the README file for a full license statement. | - | | +-----------------------------------------------------------------------+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-newmail_notifier/ @@ -26,5 +24,3 @@ $labels['testbody'] = 'This is a test notification.'; $labels['desktopdisabled'] = 'Desktop notifications are disabled in your browser.'; $labels['desktopunsupported'] = 'Your browser does not support desktop notifications.'; $labels['desktoptimeout'] = 'Close desktop notification'; - -?> diff --git a/plugins/newmail_notifier/newmail_notifier.js b/plugins/newmail_notifier/newmail_notifier.js index 5e95284cc..f06d6ea49 100644 --- a/plugins/newmail_notifier/newmail_notifier.js +++ b/plugins/newmail_notifier/newmail_notifier.js @@ -6,7 +6,7 @@ * @licstart The following is the entire license notice for the * JavaScript code in this file. * - * Copyright (c) 2013-2016, The Roundcube Dev Team + * Copyright (c) The Roundcube Dev Team * * The JavaScript code in this page is free software: you can redistribute it * and/or modify it under the terms of the GNU General Public License diff --git a/plugins/newmail_notifier/newmail_notifier.php b/plugins/newmail_notifier/newmail_notifier.php index 939d118d3..0e848e68c 100644 --- a/plugins/newmail_notifier/newmail_notifier.php +++ b/plugins/newmail_notifier/newmail_notifier.php @@ -10,7 +10,7 @@ * * @author Aleksander Machniak * - * Copyright (C) 2011-2016, Kolab Systems AG + * Copyright (C) Kolab Systems AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/plugins/password/drivers/chpasswd.php b/plugins/password/drivers/chpasswd.php index 31e50241c..fe6c6d16b 100644 --- a/plugins/password/drivers/chpasswd.php +++ b/plugins/password/drivers/chpasswd.php @@ -11,7 +11,7 @@ * @version 2.0 * @author Alex Cartwright * - * Copyright (C) 2005-2013, The Roundcube Dev Team + * Copyright (C) The Roundcube Dev Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/plugins/password/drivers/cpanel.php b/plugins/password/drivers/cpanel.php index 663ebd173..e094232d4 100644 --- a/plugins/password/drivers/cpanel.php +++ b/plugins/password/drivers/cpanel.php @@ -16,7 +16,7 @@ * @version 3.1 * @author Christian Chech * - * Copyright (C) 2005-2016, The Roundcube Dev Team + * Copyright (C) The Roundcube Dev Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/plugins/password/drivers/cpanel_webmail.php b/plugins/password/drivers/cpanel_webmail.php index 4835c5e59..3d5770442 100644 --- a/plugins/password/drivers/cpanel_webmail.php +++ b/plugins/password/drivers/cpanel_webmail.php @@ -9,7 +9,7 @@ * * @author Maikel Linke * - * Copyright (C) 2005-2016, The Roundcube Dev Team + * Copyright (C) The Roundcube Dev Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -40,6 +40,7 @@ class rcube_cpanel_webmail_password public function save($curpas, $newpass) { $url = self::url(); + $user = password::username(); $userpwd = "$user:$curpas"; $data = array( 'email' => password::username('%l'), diff --git a/plugins/password/drivers/dbmail.php b/plugins/password/drivers/dbmail.php index 1a872aa56..7c6103610 100644 --- a/plugins/password/drivers/dbmail.php +++ b/plugins/password/drivers/dbmail.php @@ -14,7 +14,7 @@ * * @version 1.0 * - * Copyright (C) 2005-2013, The Roundcube Dev Team + * Copyright (C) The Roundcube Dev Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/plugins/password/drivers/directadmin.php b/plugins/password/drivers/directadmin.php index fb1bf75a9..7444e1407 100644 --- a/plugins/password/drivers/directadmin.php +++ b/plugins/password/drivers/directadmin.php @@ -8,7 +8,7 @@ * @version 2.2 * @author Victor Benincasa * - * Copyright (C) 2005-2018, The Roundcube Dev Team + * Copyright (C) The Roundcube Dev Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -492,7 +492,6 @@ class HTTPSocket { return $x; } - /** * Set a specifc message on how to change the SSL setting, in the event that it's not set correctly. */ @@ -500,5 +499,4 @@ class HTTPSocket { { $this->ssl_setting_message = $str; } - } diff --git a/plugins/password/drivers/domainfactory.php b/plugins/password/drivers/domainfactory.php index 7b3b65caa..513e31e36 100644 --- a/plugins/password/drivers/domainfactory.php +++ b/plugins/password/drivers/domainfactory.php @@ -10,7 +10,7 @@ * @author Till Krüss * @link http://tillkruess.com/projects/roundcube/ * - * Copyright (C) 2005-2014, The Roundcube Dev Team + * Copyright (C) The Roundcube Dev Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/plugins/password/drivers/expect.php b/plugins/password/drivers/expect.php index 6fa266b04..0af39f4da 100644 --- a/plugins/password/drivers/expect.php +++ b/plugins/password/drivers/expect.php @@ -24,7 +24,7 @@ * a good starting default: * -telent -host localhost -output /tmp/passwd.log -log /tmp/passwd.log * - * Copyright (C) 2005-2014, The Roundcube Dev Team + * Copyright (C) The Roundcube Dev Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/plugins/password/drivers/gearman.php b/plugins/password/drivers/gearman.php index 4527af6d0..a05e09a7f 100644 --- a/plugins/password/drivers/gearman.php +++ b/plugins/password/drivers/gearman.php @@ -9,7 +9,7 @@ * @version 1.0 * @author Mohammad Anwari * - * Copyright (C) 2005-2014, The Roundcube Dev Team + * Copyright (C) The Roundcube Dev Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/plugins/password/drivers/hmail.php b/plugins/password/drivers/hmail.php index 66641ed9a..39339ef41 100644 --- a/plugins/password/drivers/hmail.php +++ b/plugins/password/drivers/hmail.php @@ -6,7 +6,7 @@ * @version 2.0 * @author Roland 'rosali' Liebl * - * Copyright (C) 2005-2014, The Roundcube Dev Team + * Copyright (C) The Roundcube Dev Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/plugins/password/drivers/ldap.php b/plugins/password/drivers/ldap.php index 65fe965a3..a6b979b8f 100644 --- a/plugins/password/drivers/ldap.php +++ b/plugins/password/drivers/ldap.php @@ -12,7 +12,7 @@ * method hashPassword based on code from the phpLDAPadmin development team (http://phpldapadmin.sourceforge.net/). * method randomSalt based on code from the phpLDAPadmin development team (http://phpldapadmin.sourceforge.net/). * - * Copyright (C) 2005-2014, The Roundcube Dev Team + * Copyright (C) The Roundcube Dev Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/plugins/password/drivers/ldap_exop.php b/plugins/password/drivers/ldap_exop.php index a034c95c1..796bef85b 100644 --- a/plugins/password/drivers/ldap_exop.php +++ b/plugins/password/drivers/ldap_exop.php @@ -11,7 +11,7 @@ * @version 1.0 * @author Peter Kubica * - * Copyright (C) 2005-2019, The Roundcube Dev Team + * Copyright (C) The Roundcube Dev Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/plugins/password/drivers/ldap_ppolicy.php b/plugins/password/drivers/ldap_ppolicy.php index 6b7fd1a6b..84c2c2874 100644 --- a/plugins/password/drivers/ldap_ppolicy.php +++ b/plugins/password/drivers/ldap_ppolicy.php @@ -8,7 +8,6 @@ * * @version 1.0 * @author Zbigniew Szmyd - * */ class rcube_ldap_ppolicy_password diff --git a/plugins/password/drivers/ldap_simple.php b/plugins/password/drivers/ldap_simple.php index 1a6e411ed..33e939dad 100644 --- a/plugins/password/drivers/ldap_simple.php +++ b/plugins/password/drivers/ldap_simple.php @@ -11,7 +11,7 @@ * @author Wout Decre * @author Aleksander Machniak * - * Copyright (C) 2005-2014, The Roundcube Dev Team + * Copyright (C) The Roundcube Dev Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/plugins/password/drivers/modoboa.php b/plugins/password/drivers/modoboa.php index 18ed0576a..4f41c2d35 100644 --- a/plugins/password/drivers/modoboa.php +++ b/plugins/password/drivers/modoboa.php @@ -9,7 +9,7 @@ * @version 1.0.1 * @author stephane @actionweb.fr * - * Copyright (C) 2018, The Roundcube Dev Team + * Copyright (C) The Roundcube Dev Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/plugins/password/drivers/pam.php b/plugins/password/drivers/pam.php index 5c293394a..c70dafddf 100644 --- a/plugins/password/drivers/pam.php +++ b/plugins/password/drivers/pam.php @@ -6,7 +6,7 @@ * @version 2.0 * @author Aleksander Machniak * - * Copyright (C) 2005-2013, The Roundcube Dev Team + * Copyright (C) The Roundcube Dev Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/plugins/password/drivers/poppassd.php b/plugins/password/drivers/poppassd.php index 0e31b4dd6..e01fa58b5 100644 --- a/plugins/password/drivers/poppassd.php +++ b/plugins/password/drivers/poppassd.php @@ -8,7 +8,7 @@ * @version 2.0 * @author Philip Weir * - * Copyright (C) 2005-2013, The Roundcube Dev Team + * Copyright (C) The Roundcube Dev Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/plugins/password/drivers/pw_usermod.php b/plugins/password/drivers/pw_usermod.php index 8772190b6..d439d6fb2 100644 --- a/plugins/password/drivers/pw_usermod.php +++ b/plugins/password/drivers/pw_usermod.php @@ -12,7 +12,7 @@ * @author Alex Cartwright * @author Adamson Huang * - * Copyright (C) 2005-2013, The Roundcube Dev Team + * Copyright (C) The Roundcube Dev Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/plugins/password/drivers/sasl.php b/plugins/password/drivers/sasl.php index a64107fc1..e68ba6e5e 100644 --- a/plugins/password/drivers/sasl.php +++ b/plugins/password/drivers/sasl.php @@ -15,7 +15,7 @@ * @version 2.0 * @author Thomas Bruederli * - * Copyright (C) 2005-2013, The Roundcube Dev Team + * Copyright (C) The Roundcube Dev Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/plugins/password/drivers/smb.php b/plugins/password/drivers/smb.php index 0ffcbda57..5d916d24a 100644 --- a/plugins/password/drivers/smb.php +++ b/plugins/password/drivers/smb.php @@ -20,7 +20,7 @@ * password_smb_host => samba host (default: localhost) * password_smb_cmd => smbpasswd binary (default: /usr/bin/smbpasswd) * - * Copyright (C) 2005-2013, The Roundcube Dev Team + * Copyright (C) The Roundcube Dev Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/plugins/password/drivers/sql.php b/plugins/password/drivers/sql.php index eeea0c59d..ca7e0d983 100644 --- a/plugins/password/drivers/sql.php +++ b/plugins/password/drivers/sql.php @@ -6,9 +6,9 @@ * Driver for passwords stored in SQL database * * @version 2.0 - * @author Aleksander 'A.L.E.C' Machniak + * @author Aleksander Machniak * - * Copyright (C) 2005-2013, The Roundcube Dev Team + * Copyright (C) The Roundcube Dev Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/plugins/password/drivers/virtualmin.php b/plugins/password/drivers/virtualmin.php index cfecf39b2..da8a59840 100644 --- a/plugins/password/drivers/virtualmin.php +++ b/plugins/password/drivers/virtualmin.php @@ -13,7 +13,7 @@ * @version 3.0 * @author Martijn de Munnik * - * Copyright (C) 2005-2013, The Roundcube Dev Team + * Copyright (C) The Roundcube Dev Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/plugins/password/drivers/vpopmaild.php b/plugins/password/drivers/vpopmaild.php index 85da98698..5de5c438c 100644 --- a/plugins/password/drivers/vpopmaild.php +++ b/plugins/password/drivers/vpopmaild.php @@ -8,7 +8,7 @@ * @version 2.0 * @author Johannes Hessellund * - * Copyright (C) 2005-2013, The Roundcube Dev Team + * Copyright (C) The Roundcube Dev Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/plugins/password/drivers/ximss.php b/plugins/password/drivers/ximss.php index 711554aba..0dd53ffb5 100644 --- a/plugins/password/drivers/ximss.php +++ b/plugins/password/drivers/ximss.php @@ -14,7 +14,7 @@ * @version 2.0 * @author Erik Meitner * - * Copyright (C) 2005-2013, The Roundcube Dev Team + * Copyright (C) The Roundcube Dev Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/plugins/password/drivers/xmail.php b/plugins/password/drivers/xmail.php index 3dcad4da3..1f6f6a0e4 100644 --- a/plugins/password/drivers/xmail.php +++ b/plugins/password/drivers/xmail.php @@ -15,7 +15,7 @@ * $config['xmail_pass'] = 'YourXmailControlPass'; * $config['xmail_port'] = 6017; * - * Copyright (C) 2005-2013, The Roundcube Dev Team + * Copyright (C) The Roundcube Dev Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/plugins/password/drivers/zxcvbn.php b/plugins/password/drivers/zxcvbn.php index ff79639dd..c2084b0e6 100644 --- a/plugins/password/drivers/zxcvbn.php +++ b/plugins/password/drivers/zxcvbn.php @@ -8,7 +8,7 @@ * @version 0.1 * @author Philip Weir * - * Copyright (C) 2018 Philip Weir + * Copyright (C) Philip Weir * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/plugins/password/localization/en_US.inc b/plugins/password/localization/en_US.inc index 641627948..c39ae5ce7 100644 --- a/plugins/password/localization/en_US.inc +++ b/plugins/password/localization/en_US.inc @@ -2,15 +2,13 @@ /* +-----------------------------------------------------------------------+ - | plugins/password/localization/.inc | - | | | Localization file of the Roundcube Webmail Password plugin | - | Copyright (C) 2012-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | | See the README file for a full license statement. | - | | +-----------------------------------------------------------------------+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ diff --git a/plugins/password/password.js b/plugins/password/password.js index f5080e9af..0a7c9c200 100644 --- a/plugins/password/password.js +++ b/plugins/password/password.js @@ -4,7 +4,7 @@ * @licstart The following is the entire license notice for the * JavaScript code in this file. * - * Copyright (c) 2012-2014, The Roundcube Dev Team + * Copyright (c) The Roundcube Dev Team * * The JavaScript code in this page is free software: you can redistribute it * and/or modify it under the terms of the GNU General Public License @@ -58,5 +58,5 @@ window.rcmail && rcmail.addEventListener('init', function(evt) { } }, true); - $('input:not(:hidden):first').focus(); + $('input:not(:hidden)').first().focus(); }); diff --git a/plugins/password/password.php b/plugins/password/password.php index 7eba439bb..728d81774 100644 --- a/plugins/password/password.php +++ b/plugins/password/password.php @@ -5,7 +5,7 @@ * * @author Aleksander Machniak * - * Copyright (C) 2005-2018, The Roundcube Dev Team + * Copyright (C) The Roundcube Dev Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/plugins/redundant_attachments/redundant_attachments.php b/plugins/redundant_attachments/redundant_attachments.php index 149ac9998..243b43aea 100644 --- a/plugins/redundant_attachments/redundant_attachments.php +++ b/plugins/redundant_attachments/redundant_attachments.php @@ -15,8 +15,8 @@ * @author Thomas Bruederli * @author Aleksander Machniak * - * Copyright (C) 2011-2018, The Roundcube Dev Team - * Copyright (C) 2011-2018, Kolab Systems AG + * Copyright (C) The Roundcube Dev Team + * Copyright (C) Kolab Systems AG * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 diff --git a/plugins/subscriptions_option/localization/en_US.inc b/plugins/subscriptions_option/localization/en_US.inc index 3eb18fc1d..f4008f8d6 100644 --- a/plugins/subscriptions_option/localization/en_US.inc +++ b/plugins/subscriptions_option/localization/en_US.inc @@ -2,15 +2,13 @@ /* +-----------------------------------------------------------------------+ - | plugins/subscriptions_option/localization/.inc | - | | | Localization file of the Roundcube Webmail Subscriptions plugin | - | Copyright (C) 2012-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | | See the README file for a full license statement. | - | | +-----------------------------------------------------------------------+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-subscriptions_option/ @@ -18,5 +16,3 @@ $labels = array(); $labels['useimapsubscriptions'] = 'Use IMAP Subscriptions'; - -?> diff --git a/plugins/userinfo/localization/en_US.inc b/plugins/userinfo/localization/en_US.inc index 01230de85..86dd44017 100644 --- a/plugins/userinfo/localization/en_US.inc +++ b/plugins/userinfo/localization/en_US.inc @@ -2,15 +2,13 @@ /* +-----------------------------------------------------------------------+ - | plugins/userinfo/localization/.inc | - | | | Localization file of the Roundcube Webmail Userinfo plugin | - | Copyright (C) 2012-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | | See the README file for a full license statement. | - | | +-----------------------------------------------------------------------+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-userinfo/ @@ -21,5 +19,3 @@ $labels['userinfo'] = 'User info'; $labels['created'] = 'Created'; $labels['lastlogin'] = 'Last Login'; $labels['defaultidentity'] = 'Default Identity'; - -?> \ No newline at end of file diff --git a/plugins/vcard_attachments/localization/en_US.inc b/plugins/vcard_attachments/localization/en_US.inc index 99af44509..e891776a0 100644 --- a/plugins/vcard_attachments/localization/en_US.inc +++ b/plugins/vcard_attachments/localization/en_US.inc @@ -2,15 +2,13 @@ /* +-----------------------------------------------------------------------+ - | plugins/vcard_attachments/localization/.inc | - | | | Localization file of the Roundcube Webmail Vcard Attachments plugin | - | Copyright (C) 2012-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | | See the README file for a full license statement. | - | | +-----------------------------------------------------------------------+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-vcard_attachments/ @@ -23,5 +21,3 @@ $labels['attachvcard'] = 'Attach vCard'; $labels['vcardattached'] = 'vCard file attached.'; $labels['vcard'] = 'vCard'; $labels['forwardvcard'] = 'Forward vCard'; - -?> \ No newline at end of file diff --git a/plugins/vcard_attachments/vcardattach.js b/plugins/vcard_attachments/vcardattach.js index bb2c18c59..248e80070 100644 --- a/plugins/vcard_attachments/vcardattach.js +++ b/plugins/vcard_attachments/vcardattach.js @@ -4,7 +4,7 @@ * @licstart The following is the entire license notice for the * JavaScript code in this file. * - * Copyright (c) 2012-2017, The Roundcube Dev Team + * Copyright (c) The Roundcube Dev Team * * The JavaScript code in this page is free software: you can redistribute it * and/or modify it under the terms of the GNU General Public License diff --git a/plugins/zipdownload/localization/en_US.inc b/plugins/zipdownload/localization/en_US.inc index 15041d57b..a5847fba9 100644 --- a/plugins/zipdownload/localization/en_US.inc +++ b/plugins/zipdownload/localization/en_US.inc @@ -2,15 +2,13 @@ /* +-----------------------------------------------------------------------+ - | plugins/zipdownload/localization/.inc | - | | | Localization file of the Roundcube Webmail Zipdownload plugin | - | Copyright (C) 2012-2014, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | | See the README file for a full license statement. | - | | +-----------------------------------------------------------------------+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/ diff --git a/plugins/zipdownload/zipdownload.js b/plugins/zipdownload/zipdownload.js index ae3f0aad3..c2e7b4ead 100644 --- a/plugins/zipdownload/zipdownload.js +++ b/plugins/zipdownload/zipdownload.js @@ -4,7 +4,7 @@ * @licstart The following is the entire license notice for the * JavaScript code in this file. * - * Copyright (c) 2013-2018, The Roundcube Dev Team + * Copyright (c) The Roundcube Dev Team * * The JavaScript code in this page is free software: you can redistribute it * and/or modify it under the terms of the GNU General Public License diff --git a/program/include/clisetup.php b/program/include/clisetup.php index 324bac364..5c2e30c5d 100644 --- a/program/include/clisetup.php +++ b/program/include/clisetup.php @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/include/clisetup.php | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2010-2014, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/include/iniset.php b/program/include/iniset.php index 0c019724d..255925cab 100644 --- a/program/include/iniset.php +++ b/program/include/iniset.php @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/include/iniset.php | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2008-2017, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/include/rcmail.php b/program/include/rcmail.php index 3c4c5bd04..1a9452abf 100644 --- a/program/include/rcmail.php +++ b/program/include/rcmail.php @@ -2,11 +2,10 @@ /** +-----------------------------------------------------------------------+ - | program/include/rcmail.php | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2008-2014, The Roundcube Dev Team | - | Copyright (C) 2011-2014, Kolab Systems AG | + | | + | Copyright (C) The Roundcube Dev Team | + | Copyright (C) Kolab Systems AG | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -307,13 +306,13 @@ class rcmail extends rcube */ public function get_address_sources($writeable = false, $skip_hidden = false) { - $abook_type = (string) $this->config->get('address_book_type'); + $abook_type = strtolower((string) $this->config->get('address_book_type', 'sql')); $ldap_config = (array) $this->config->get('ldap_public'); $autocomplete = (array) $this->config->get('autocomplete_addressbooks'); $list = array(); - // We are using the DB address book or a plugin address book - if (!empty($abook_type) && strtolower($abook_type) != 'ldap') { + // SQL-based (built-in) address book + if ($abook_type === 'sql') { if (!isset($this->address_books['0'])) { $this->address_books['0'] = new rcube_contacts($this->db, $this->get_user_id()); } @@ -324,10 +323,11 @@ class rcmail extends rcube 'groups' => $this->address_books['0']->groups, 'readonly' => $this->address_books['0']->readonly, 'undelete' => $this->address_books['0']->undelete && $this->config->get('undo_timeout'), - 'autocomplete' => in_array('sql', $autocomplete), + 'autocomplete' => in_array_nocase('sql', $autocomplete), ); } + // LDAP address book(s) if (!empty($ldap_config)) { foreach ($ldap_config as $id => $prop) { // handle misconfiguration @@ -346,6 +346,7 @@ class rcmail extends rcube } } + // Plugins can also add address books, or re-order the list $plugin = $this->plugins->exec_hook('addressbooks_list', array('sources' => $list)); $list = $plugin['sources']; @@ -715,6 +716,40 @@ class rcmail extends rcube } } + /** + * Detects session errors + * + * @return string Error label + */ + public function session_error() + { + // log session failures + $task = rcube_utils::get_input_value('_task', rcube_utils::INPUT_GPC); + + if ($task && !in_array($task, array('login', 'logout')) && ($sess_id = $_COOKIE[ini_get('session.name')])) { + $log = "Aborted session $sess_id; no valid session data found"; + $error = 'sessionerror'; + + // In rare cases web browser might end up with multiple cookies of the same name + // but different params, e.g. domain (webmail.domain.tld and .webmail.domain.tld). + // In such case browser will send both cookies in the request header + // problem is that PHP session handler can use only one and if that one session + // does not exist we'll end up here + $cookie = rcube_utils::request_header('Cookie'); + $cookie_sessid = $this->config->get('session_name') ?: 'roundcube_sessid'; + $cookie_sessauth = $this->config->get('session_auth_name') ?: 'roundcube_sessauth'; + + if (substr_count($cookie, $cookie_sessid.'=') > 1 || substr_count($cookie, $cookie_sessauth.'=') > 1) { + $log .= ". Cookies mismatch"; + $error = 'cookiesmismatch'; + } + + $this->session->log($log); + + return $error; + } + } + /** * Auto-select IMAP host based on the posted login information * @@ -1110,6 +1145,10 @@ class rcmail extends rcube return; } + // don't log full session id for security reasons + $session_id = session_id(); + $session_id = $session_id ? substr($session_id, 0, 16) : 'no-session'; + // failed login if ($failed_login) { // don't fill the log with complete input, which could @@ -1119,7 +1158,7 @@ class rcmail extends rcube } $message = sprintf('Failed login for %s from %s in session %s (error: %d)', - $user, rcube_utils::remote_ip(), session_id(), $error_code); + $user, rcube_utils::remote_ip(), $session_id, $error_code); } // successful login else { @@ -1131,7 +1170,7 @@ class rcmail extends rcube } $message = sprintf('Successful login for %s (ID: %d) from %s in session %s', - $user_name, $user_id, rcube_utils::remote_ip(), session_id()); + $user_name, $user_id, rcube_utils::remote_ip(), $session_id); } // log login diff --git a/program/include/rcmail_html_page.php b/program/include/rcmail_html_page.php index df50552e7..73f791914 100644 --- a/program/include/rcmail_html_page.php +++ b/program/include/rcmail_html_page.php @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/include/rcmail_html_page.php | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2006-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Render a simple HTML page with the given contents | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ diff --git a/program/include/rcmail_install.php b/program/include/rcmail_install.php index 8a9ae0fc2..2846330c0 100644 --- a/program/include/rcmail_install.php +++ b/program/include/rcmail_install.php @@ -2,14 +2,19 @@ /** +-----------------------------------------------------------------------+ - | rcmail_install.php | + | This file is part of the Roundcube Webmail client | | | - | This file is part of the Roundcube Webmail package | - | Copyright (C) 2008-2018, The Roundcube Dev Team | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | | See the README file for a full license statement. | + | | + | PURPOSE: | + | Roundcube Installer | + +-----------------------------------------------------------------------+ + | Author: Thomas Bruederli | + | Author: Aleksander Machniak | +-----------------------------------------------------------------------+ */ diff --git a/program/include/rcmail_output.php b/program/include/rcmail_output.php index f34c147e7..0038f2cac 100644 --- a/program/include/rcmail_output.php +++ b/program/include/rcmail_output.php @@ -2,17 +2,16 @@ /** +-----------------------------------------------------------------------+ - | program/include/rcmail_output.php | + | This file is part of the Roundcube Webmail client | | | - | This file is part of the Roundcube PHP suite | - | Copyright (C) 2005-2012 The Roundcube Dev Team | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | | See the README file for a full license statement. | + | | | CONTENTS: | | Abstract class for output generation | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | | Author: Aleksander Machniak | diff --git a/program/include/rcmail_output_cli.php b/program/include/rcmail_output_cli.php index 7d877cc88..68bc7f8d3 100644 --- a/program/include/rcmail_output_cli.php +++ b/program/include/rcmail_output_cli.php @@ -2,17 +2,16 @@ /** +-----------------------------------------------------------------------+ - | program/include/rcmail_output_cli.php | + | This file is part of the Roundcube Webmail client | | | - | This file is part of the Roundcube PHP suite | - | Copyright (C) 2005-2014 The Roundcube Dev Team | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | | See the README file for a full license statement. | + | | | CONTENTS: | | Abstract class for output generation | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ diff --git a/program/include/rcmail_output_html.php b/program/include/rcmail_output_html.php index e1d67d6c2..89fb3988a 100644 --- a/program/include/rcmail_output_html.php +++ b/program/include/rcmail_output_html.php @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/include/rcmail_output_html.php | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2006-2014, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Class to handle HTML page output using a skin template. | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ @@ -118,7 +116,7 @@ class rcmail_output_html extends rcmail_output @licstart The following is the entire license notice for the JavaScript code in this page. - Copyright (C) 2005-2014 The Roundcube Dev Team + Copyright (C) The Roundcube Dev Team The JavaScript code in this page is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License diff --git a/program/include/rcmail_output_json.php b/program/include/rcmail_output_json.php index 6530db735..38418421d 100644 --- a/program/include/rcmail_output_json.php +++ b/program/include/rcmail_output_json.php @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/include/rcmail_output_json.php | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2008-2012, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/include/rcmail_resend_mail.php b/program/include/rcmail_resend_mail.php index 95b785455..5b764cd98 100644 --- a/program/include/rcmail_resend_mail.php +++ b/program/include/rcmail_resend_mail.php @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/include/rcmail_resend_mail.php | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2017, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/include/rcmail_sendmail.php b/program/include/rcmail_sendmail.php index 0b9df0f77..ef7376792 100644 --- a/program/include/rcmail_sendmail.php +++ b/program/include/rcmail_sendmail.php @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/include/rcmail_sendmail.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2017, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/include/rcmail_string_replacer.php b/program/include/rcmail_string_replacer.php index c3b979719..4eae2ac45 100644 --- a/program/include/rcmail_string_replacer.php +++ b/program/include/rcmail_string_replacer.php @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/include/rcmail_string_replacer.php | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2012-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Turn URLs and email addresses into clickable links | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ diff --git a/program/include/rcmail_utils.php b/program/include/rcmail_utils.php index 7c4170367..78f38646a 100644 --- a/program/include/rcmail_utils.php +++ b/program/include/rcmail_utils.php @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/include/rcmail_utils.php | + | This file is part of the Roundcube Webmail client | | | - | This file is part of the Roundcube PHP suite | - | Copyright (C) 2005-2015 The Roundcube Dev Team | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | CONTENTS: | | Roundcube utilities | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | | Author: Aleksander Machniak | @@ -47,7 +45,7 @@ class rcmail_utils $db->db_connect('w'); if (!$db->is_connected()) { - rcube::raise_error("Error connecting to database: " . $db->is_error(), false, true); + rcube::raise_error("Failed to connect to database", false, true); } self::$db = $db; diff --git a/program/js/app.js b/program/js/app.js index 9fa1ba236..2bd94bc6e 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -6,8 +6,8 @@ * @licstart The following is the entire license notice for the * JavaScript code in this file. * - * Copyright (C) 2005-2015, The Roundcube Dev Team - * Copyright (C) 2011-2015, Kolab Systems AG + * Copyright (C) The Roundcube Dev Team + * Copyright (C) Kolab Systems AG * * The JavaScript code in this page is free software: you can * redistribute it and/or modify it under the terms of the GNU @@ -119,8 +119,10 @@ function rcube_webmail() this.buttons[command].push(button_prop); - if (this.loaded) + if (this.loaded) { this.init_button(command, button_prop); + this.set_button(command, (this.commands[command] ? 'act' : 'pas')); + } }; // register a button with popup menu, to set its state according to the state of all commands in the menu @@ -163,7 +165,10 @@ function rcube_webmail() return disabled = false; } }); - $(this[0]).add($(this[0]).parent('.dropbutton')).addClass(disabled ? 'disabled' : 'active').removeClass(disabled ? 'active' : 'disabled'); + + $(this[0]).add($(this[0]).parent('.dropbutton')) + .addClass(disabled ? 'disabled' : 'active') + .removeClass(disabled ? 'active' : 'disabled'); }); }, 50); }; @@ -2962,7 +2967,7 @@ function rcube_webmail() r.parent_uid = 0; if (r.has_children) { // replace 'leaf' with 'collapsed' - $('#'+r.id+' .leaf:first') + $('#' + r.id + ' .leaf').first() .attr('id', 'rcmexpando' + r.id) .attr('class', (r.obj.style.display != 'none' ? 'expanded' : 'collapsed')) .mousedown({uid: r.uid}, function(e) { @@ -4322,7 +4327,7 @@ function rcube_webmail() }); content = $('
    ').append(nodes); - $('input:not([disabled]):first', content).attr('checked', true); + $('input:not([disabled])', content).first().attr('checked', true); this.simple_dialog(content, this.get_label('markallread'), function() { @@ -5692,7 +5697,7 @@ function rcube_webmail() if (this.import_dialog) { this.import_state = state; // activate Import button depending on state - $(this.import_dialog).parent().find('.ui-dialog-buttonset > button:first').attr('disabled', state != 'error'); + $(this.import_dialog).parent().find('.ui-dialog-buttonset > button').first().attr('disabled', state != 'error'); } }; @@ -5980,7 +5985,7 @@ function rcube_webmail() // select the first if (!this.env.contacts.length) { - this.ksearch_select($('li:first', ul).get(0)); + this.ksearch_select($('li', ul)[0]); } } @@ -6920,7 +6925,7 @@ function rcube_webmail() row.appendTo(appendcontainer.show()); if (input.is('div')) - input.find('input:first').focus(); + input.find('input').first().focus(); else input.first().focus(); @@ -7419,10 +7424,10 @@ function rcube_webmail() } // set folder name - $('a:first', row).text(display_name).removeAttr('title'); + $('a', row).first().text(display_name).removeAttr('title'); // update subscription checkbox - $('input[name="_subscribed[]"]:first', row).val(id) + $('input[name="_subscribed[]"]', row).first().val(id) .prop({checked: subscribed ? true : false, disabled: is_protected ? true : false}); // add to folder/row-ID map @@ -7512,7 +7517,7 @@ function rcube_webmail() } if (parent && n == parent) { - $('ul:first', parent).append(row); + $('ul', parent).first().append(row); } else { while (p = $(n).parent().parent().get(0)) { @@ -7573,7 +7578,7 @@ function rcube_webmail() old_folder = this.env.subscriptionrows[oldid], prefix_len_id = oldid.length, prefix_len_name = old_folder[0].length, - subscribed = $('input[name="_subscribed[]"]:first', row).prop('checked'); + subscribed = $('input[name="_subscribed[]"]', row).first().prop('checked'); // no renaming, only update class_name if (oldid == id) { @@ -7588,7 +7593,7 @@ function rcube_webmail() newid = id + fname.slice(prefix_len_id); this.id = 'rcmli' + ref.html_identifier_encode(newid); - $('input[name="_subscribed[]"]:first', this).val(newid); + $('input[name="_subscribed[]"]', this).first().val(newid); folder[0] = name + folder[0].slice(prefix_len_name); subfolders[newid] = folder; @@ -7673,7 +7678,7 @@ function rcube_webmail() { var row = this.subscription_list.get_item(folder, true); if (row) - $('input[name="_subscribed[]"]:first', row).prop('disabled', true); + $('input[name="_subscribed[]"]', row).first().prop('disabled', true); }; // resets state of subscription checkbox (e.g. on error) @@ -7681,7 +7686,7 @@ function rcube_webmail() { var row = this.subscription_list.get_item(folder, true); if (row) - $('input[name="_subscribed[]"]:first', row).prop('checked', state); + $('input[name="_subscribed[]"]', row).first().prop('checked', state); }; this.folder_size = function(folder) @@ -7805,14 +7810,11 @@ function rcube_webmail() else if (button[state] !== undefined) { obj.className = button[state]; } + // disable/enable input buttons if (button.type == 'input' || button.type == 'button') { obj.disabled = state == 'pas'; } - else if (button.type == 'uibutton') { - button.status = state; - $(obj).button('option', 'disabled', state == 'pas'); - } else { $obj = $(obj); $obj diff --git a/program/js/common.js b/program/js/common.js index 1422042ad..9eb10a8b1 100644 --- a/program/js/common.js +++ b/program/js/common.js @@ -6,7 +6,7 @@ * @licstart The following is the entire license notice for the * JavaScript code in this file. * - * Copyright (c) 2005-2014, The Roundcube Dev Team + * Copyright (c) The Roundcube Dev Team * * The JavaScript code in this page is free software: you can * redistribute it and/or modify it under the terms of the GNU diff --git a/program/js/editor.js b/program/js/editor.js index 191196eb6..9b88c89cd 100644 --- a/program/js/editor.js +++ b/program/js/editor.js @@ -6,7 +6,7 @@ * @licstart The following is the entire license notice for the * JavaScript code in this file. * - * Copyright (c) 2006-2014, The Roundcube Dev Team + * Copyright (c) The Roundcube Dev Team * * The JavaScript code in this page is free software: you can * redistribute it and/or modify it under the terms of the GNU @@ -174,7 +174,7 @@ function rcube_text_editor(config, id) if (rcmail.env.action == 'compose') { var area = $('#' + this.id), - height = $('div.mce-toolbar-grp:first', area.parent()).height(); + height = $('div.mce-toolbar-grp', area.parent()).first().height(); // the editor might be still not fully loaded, making the editing area // inaccessible, wait and try again (#1490310) @@ -686,7 +686,7 @@ function rcube_text_editor(config, id) } } - cancel = dialog.parent().parent().find('button:last').parent(); + cancel = dialog.parent().parent().find('button').last().parent(); // Add custom Tab key handlers, tabindex does not work list = $('#image-selector-list').append(list).on('keydown', 'li', function(e) { @@ -706,7 +706,7 @@ function rcube_text_editor(config, id) button.keydown(function(e) { if (e.which == 9) { // Tab - if (rcube_event.get_modifier(e) == SHIFT_KEY || !list.find('li:first').focus().length) { + if (rcube_event.get_modifier(e) == SHIFT_KEY || !list.find('li').first().focus().length) { cancel.focus(); } @@ -720,7 +720,7 @@ function rcube_text_editor(config, id) cancel.keydown(function(e) { if (e.which == 9) { - if (rcube_event.get_modifier(e) != SHIFT_KEY || !list.find('li:last').focus().length) { + if (rcube_event.get_modifier(e) != SHIFT_KEY || !list.find('li').last().focus().length) { button.focus(); } diff --git a/program/js/googiespell.js b/program/js/googiespell.js index 05110edae..02dfb94c7 100644 --- a/program/js/googiespell.js +++ b/program/js/googiespell.js @@ -8,8 +8,8 @@ * JavaScript code in this file. * * Copyright (C) 2006 Amir Salihefendic - * Copyright (C) 2009 The Roundcube Dev Team - * Copyright (C) 2011 Kolab Systems AG + * Copyright (C) The Roundcube Dev Team + * Copyright (C) Kolab Systems AG * * The JavaScript code in this page is free software: you can * redistribute it and/or modify it under the terms of the GNU @@ -28,7 +28,7 @@ * @licend The above is the entire license notice * for the JavaScript code in this file. * - * @author 4mir Salihefendic + * @author 4mir Salihefendic * @author Aleksander Machniak - */ diff --git a/program/js/list.js b/program/js/list.js index 75aa1f383..bfe7dd46f 100644 --- a/program/js/list.js +++ b/program/js/list.js @@ -6,7 +6,7 @@ * @licstart The following is the entire license notice for the * JavaScript code in this file. * - * Copyright (c) 2005-2014, The Roundcube Dev Team + * Copyright (c) The Roundcube Dev Team * * The JavaScript code in this page is free software: you can * redistribute it and/or modify it under the terms of the GNU diff --git a/program/js/treelist.js b/program/js/treelist.js index 6e4d3a599..dfaf87472 100644 --- a/program/js/treelist.js +++ b/program/js/treelist.js @@ -6,7 +6,7 @@ * @licstart The following is the entire license notice for the * JavaScript code in this file. * - * Copyright (c) 2013-2014, The Roundcube Dev Team + * Copyright (c) The Roundcube Dev Team * * The JavaScript code in this page is free software: you can * redistribute it and/or modify it under the terms of the GNU @@ -757,7 +757,7 @@ function rcube_treelist_widget(node, p) // allow virtual nodes to receive focus if (node.virtual) { - li.children('a:first').attr('tabindex', '0'); + li.children('a').first().attr('tabindex', '0'); } result.push(node); @@ -899,19 +899,19 @@ function rcube_treelist_widget(node, p) next = li[mod](), limit, parent; if (dir > 0 && !from_child && li.children('ul[role=group]:visible').length) { - li.children('ul').children('li:first').find('a:first').focus(); + li.children('ul').children('li').first().find('a').first().focus(); } else if (dir < 0 && !from_child && next.children('ul[role=group]:visible').length) { - next.children('ul').children('li:last').find('a:first').focus(); + next.children('ul').children('li').last().find('a').first().focus(); } - else if (next.length && next.find('a:first').focus().length) { + else if (next.length && next.find('a').first().focus().length) { // focused } else { parent = li.parent().closest('li[role=treeitem]'); if (parent.length) if (dir < 0) { - parent.find('a:first').focus(); + parent.find('a').first().focus(); } else { focus_next(parent, dir, true); @@ -937,7 +937,7 @@ function rcube_treelist_widget(node, p) { var node, child; if (selection && (node = id2dom(selection))) { - child = node.children('ul').children('li:first'); + child = node.children('ul').children('li').first(); if (child.length) { return dom2id(child); } @@ -961,7 +961,7 @@ function rcube_treelist_widget(node, p) var node, prev, child; if (selection && (node = id2dom(selection))) { prev = node.prev(); - child = prev.find('li:last'); + child = prev.find('li').last(); if (child.length) { return dom2id(child); diff --git a/program/lib/Roundcube/bootstrap.php b/program/lib/Roundcube/bootstrap.php index 8868d5747..14886b6a9 100644 --- a/program/lib/Roundcube/bootstrap.php +++ b/program/lib/Roundcube/bootstrap.php @@ -2,8 +2,9 @@ /** +-----------------------------------------------------------------------+ - | This file is part of the Roundcube PHP suite | - | Copyright (C) 2005-2017, The Roundcube Dev Team | + | This file is part of the Roundcube webmail client | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/cache/apc.php b/program/lib/Roundcube/cache/apc.php index 46a3b13b0..25fc076c6 100644 --- a/program/lib/Roundcube/cache/apc.php +++ b/program/lib/Roundcube/cache/apc.php @@ -3,8 +3,9 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2011-2018, The Roundcube Dev Team | - | Copyright (C) 2011-2018, Kolab Systems AG | + | | + | Copyright (C) The Roundcube Dev Team | + | Copyright (C) Kolab Systems AG | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/cache/db.php b/program/lib/Roundcube/cache/db.php index 23f2103eb..695f90074 100644 --- a/program/lib/Roundcube/cache/db.php +++ b/program/lib/Roundcube/cache/db.php @@ -3,8 +3,9 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2011-2018, The Roundcube Dev Team | - | Copyright (C) 2011-2018, Kolab Systems AG | + | | + | Copyright (C) The Roundcube Dev Team | + | Copyright (C) Kolab Systems AG | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/cache/memcache.php b/program/lib/Roundcube/cache/memcache.php index f3450dd97..cf84f2bd0 100644 --- a/program/lib/Roundcube/cache/memcache.php +++ b/program/lib/Roundcube/cache/memcache.php @@ -3,8 +3,9 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2011-2018, The Roundcube Dev Team | - | Copyright (C) 2011-2018, Kolab Systems AG | + | | + | Copyright (C) The Roundcube Dev Team | + | Copyright (C) Kolab Systems AG | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/cache/redis.php b/program/lib/Roundcube/cache/redis.php index 4b4b3ae01..47c29edf6 100644 --- a/program/lib/Roundcube/cache/redis.php +++ b/program/lib/Roundcube/cache/redis.php @@ -3,8 +3,9 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2011-2018, The Roundcube Dev Team | - | Copyright (C) 2011-2018, Kolab Systems AG | + | | + | Copyright (C) The Roundcube Dev Team | + | Copyright (C) Kolab Systems AG | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/db/mssql.php b/program/lib/Roundcube/db/mssql.php index 4138b1489..38edf037d 100644 --- a/program/lib/Roundcube/db/mssql.php +++ b/program/lib/Roundcube/db/mssql.php @@ -3,7 +3,8 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2012, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/db/mysql.php b/program/lib/Roundcube/db/mysql.php index 06dac0d2c..06f27efdd 100644 --- a/program/lib/Roundcube/db/mysql.php +++ b/program/lib/Roundcube/db/mysql.php @@ -3,7 +3,8 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2012, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/db/oracle.php b/program/lib/Roundcube/db/oracle.php index b3ae58452..cc0e4d92f 100644 --- a/program/lib/Roundcube/db/oracle.php +++ b/program/lib/Roundcube/db/oracle.php @@ -3,7 +3,8 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2011-2014, Kolab Systems AG | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/db/pgsql.php b/program/lib/Roundcube/db/pgsql.php index 290c8a3e8..957d3f4e5 100644 --- a/program/lib/Roundcube/db/pgsql.php +++ b/program/lib/Roundcube/db/pgsql.php @@ -3,7 +3,8 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2017, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/db/sqlite.php b/program/lib/Roundcube/db/sqlite.php index b66c56097..546b6e9b0 100644 --- a/program/lib/Roundcube/db/sqlite.php +++ b/program/lib/Roundcube/db/sqlite.php @@ -3,7 +3,8 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2012, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/db/sqlsrv.php b/program/lib/Roundcube/db/sqlsrv.php index 7b64ccea2..7d561e2d7 100644 --- a/program/lib/Roundcube/db/sqlsrv.php +++ b/program/lib/Roundcube/db/sqlsrv.php @@ -3,7 +3,8 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2012, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/html.php b/program/lib/Roundcube/html.php index 1b175b3fd..71ca68e3e 100644 --- a/program/lib/Roundcube/html.php +++ b/program/lib/Roundcube/html.php @@ -3,7 +3,8 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/rcube.php b/program/lib/Roundcube/rcube.php index 2f77ea05d..0b58cbc82 100644 --- a/program/lib/Roundcube/rcube.php +++ b/program/lib/Roundcube/rcube.php @@ -3,8 +3,9 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2008-2014, The Roundcube Dev Team | - | Copyright (C) 2011-2014, Kolab Systems AG | + | | + | Copyright (C) The Roundcube Dev Team | + | Copyright (C) Kolab Systems AG | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -452,8 +453,8 @@ class rcube */ public function session_init() { - // session started (Installer?) - if (session_id()) { + // Ignore in CLI mode or when session started (Installer?) + if (empty($_SERVER['REMOTE_ADDR']) || session_id()) { return; } @@ -491,14 +492,10 @@ class rcube ini_set('session.gc_probability', 1); } - // get session driver instance + // Start the session $this->session = rcube_session::factory($this->config); $this->session->register_gc_handler(array($this, 'gc')); - - // start PHP session (if not in CLI mode) - if ($_SERVER['REMOTE_ADDR']) { - $this->session->start(); - } + $this->session->start(); } /** @@ -1355,21 +1352,17 @@ class rcube self::log_bug($arg); } + if ($cli) { + fwrite(STDERR, 'ERROR: ' . trim($arg['message']) . "\n"); + } + else if (is_object(self::$instance->output)) { + self::$instance->output->raise_error($arg['code'], $arg['message']); + } + // terminate script if ($terminate) { - // display error page - if (is_object(self::$instance->output)) { - self::$instance->output->raise_error($arg['code'], $arg['message']); - } - else if ($cli) { - fwrite(STDERR, 'ERROR: ' . $arg['message']); - } - exit(1); } - else if ($cli) { - fwrite(STDERR, 'ERROR: ' . $arg['message']); - } } /** diff --git a/program/lib/Roundcube/rcube_addressbook.php b/program/lib/Roundcube/rcube_addressbook.php index 6c885b4fe..8b7d99bf5 100644 --- a/program/lib/Roundcube/rcube_addressbook.php +++ b/program/lib/Roundcube/rcube_addressbook.php @@ -3,7 +3,8 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2006-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/rcube_base_replacer.php b/program/lib/Roundcube/rcube_base_replacer.php index a5d3f8a96..64369be51 100644 --- a/program/lib/Roundcube/rcube_base_replacer.php +++ b/program/lib/Roundcube/rcube_base_replacer.php @@ -3,7 +3,8 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2012, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/rcube_browser.php b/program/lib/Roundcube/rcube_browser.php index 6b1448fc5..4e0f9d0f1 100644 --- a/program/lib/Roundcube/rcube_browser.php +++ b/program/lib/Roundcube/rcube_browser.php @@ -3,7 +3,8 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2007-2015, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/rcube_cache.php b/program/lib/Roundcube/rcube_cache.php index 895b76fb6..4782d750d 100644 --- a/program/lib/Roundcube/rcube_cache.php +++ b/program/lib/Roundcube/rcube_cache.php @@ -3,8 +3,9 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2011, The Roundcube Dev Team | - | Copyright (C) 2011, Kolab Systems AG | + | | + | Copyright (C) The Roundcube Dev Team | + | Copyright (C) Kolab Systems AG | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/rcube_charset.php b/program/lib/Roundcube/rcube_charset.php index 86e2e17d4..b106965e2 100644 --- a/program/lib/Roundcube/rcube_charset.php +++ b/program/lib/Roundcube/rcube_charset.php @@ -3,8 +3,9 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2012, The Roundcube Dev Team | - | Copyright (C) 2011-2012, Kolab Systems AG | + | | + | Copyright (C) The Roundcube Dev Team | + | Copyright (C) Kolab Systems AG | | Copyright (C) 2000 Edmund Grimley Evans | | | | Licensed under the GNU General Public License version 3 or | diff --git a/program/lib/Roundcube/rcube_config.php b/program/lib/Roundcube/rcube_config.php index 62093aa6a..493e65783 100644 --- a/program/lib/Roundcube/rcube_config.php +++ b/program/lib/Roundcube/rcube_config.php @@ -3,7 +3,8 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2008-2014, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -49,6 +50,7 @@ class rcube_config 'min_refresh_interval' => 'min_keep_alive', 'messages_cache_ttl' => 'message_cache_lifetime', 'mail_read_time' => 'preview_pane_mark_read', + 'session_debug' => 'log_session', 'redundant_attachments_cache_ttl' => 'redundant_attachments_memcache_ttl', ); diff --git a/program/lib/Roundcube/rcube_contacts.php b/program/lib/Roundcube/rcube_contacts.php index 55e5f6fb3..6e0de82d9 100644 --- a/program/lib/Roundcube/rcube_contacts.php +++ b/program/lib/Roundcube/rcube_contacts.php @@ -3,7 +3,8 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2006-2012, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/rcube_content_filter.php b/program/lib/Roundcube/rcube_content_filter.php index 88f780666..59441639d 100644 --- a/program/lib/Roundcube/rcube_content_filter.php +++ b/program/lib/Roundcube/rcube_content_filter.php @@ -3,7 +3,8 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2011, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/rcube_csv2vcard.php b/program/lib/Roundcube/rcube_csv2vcard.php index 50e2313cd..e7353f0b3 100644 --- a/program/lib/Roundcube/rcube_csv2vcard.php +++ b/program/lib/Roundcube/rcube_csv2vcard.php @@ -3,7 +3,8 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2008-2012, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/rcube_db.php b/program/lib/Roundcube/rcube_db.php index e106b41f9..12e3be6a7 100644 --- a/program/lib/Roundcube/rcube_db.php +++ b/program/lib/Roundcube/rcube_db.php @@ -3,7 +3,8 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2012, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/rcube_enriched.php b/program/lib/Roundcube/rcube_enriched.php index b9de5693a..8c4d0e800 100644 --- a/program/lib/Roundcube/rcube_enriched.php +++ b/program/lib/Roundcube/rcube_enriched.php @@ -3,7 +3,8 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2012, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/rcube_html2text.php b/program/lib/Roundcube/rcube_html2text.php index 6562de8cc..371c8f611 100644 --- a/program/lib/Roundcube/rcube_html2text.php +++ b/program/lib/Roundcube/rcube_html2text.php @@ -3,7 +3,8 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2008-2012, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | Copyright (c) 2005-2007, Jon Abernathy | | | | Licensed under the GNU General Public License version 3 or | diff --git a/program/lib/Roundcube/rcube_image.php b/program/lib/Roundcube/rcube_image.php index 45c48c94e..2d10578ce 100644 --- a/program/lib/Roundcube/rcube_image.php +++ b/program/lib/Roundcube/rcube_image.php @@ -3,8 +3,9 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2012, The Roundcube Dev Team | - | Copyright (C) 2011-2012, Kolab Systems AG | + | | + | Copyright (C) The Roundcube Dev Team | + | Copyright (C) Kolab Systems AG | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/rcube_imap.php b/program/lib/Roundcube/rcube_imap.php index 97958f6ef..e5ac6e274 100644 --- a/program/lib/Roundcube/rcube_imap.php +++ b/program/lib/Roundcube/rcube_imap.php @@ -3,8 +3,9 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2012, The Roundcube Dev Team | - | Copyright (C) 2011-2012, Kolab Systems AG | + | | + | Copyright (C) The Roundcube Dev Team | + | Copyright (C) Kolab Systems AG | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -3689,6 +3690,16 @@ class rcube_imap extends rcube_storage $data['UNDELETED'] = $this->icache['undeleted_idx']; } + // dovecot does not return HIGHESTMODSEQ until requested, we use it though in our caching system + // calling STATUS is needed only once, after first use mod-seq db will be maintained + if (!isset($data['HIGHESTMODSEQ']) && empty($data['NOMODSEQ']) + && ($this->get_capability('QRESYNC') || $this->get_capability('CONDSTORE')) + ) { + if ($add_data = $this->conn->status($folder, array('HIGHESTMODSEQ'))) { + $data = array_merge($data, $add_data); + } + } + return $data; } diff --git a/program/lib/Roundcube/rcube_imap_cache.php b/program/lib/Roundcube/rcube_imap_cache.php index 4cca3ac60..1ef238aee 100644 --- a/program/lib/Roundcube/rcube_imap_cache.php +++ b/program/lib/Roundcube/rcube_imap_cache.php @@ -3,7 +3,8 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2012, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/rcube_imap_generic.php b/program/lib/Roundcube/rcube_imap_generic.php index 17cc3a93f..3fe3f7b62 100644 --- a/program/lib/Roundcube/rcube_imap_generic.php +++ b/program/lib/Roundcube/rcube_imap_generic.php @@ -3,8 +3,9 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2015, The Roundcube Dev Team | - | Copyright (C) 2011-2012, Kolab Systems AG | + | | + | Copyright (C) The Roundcube Dev Team | + | Copyright (C) Kolab Systems AG | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/rcube_imap_search.php b/program/lib/Roundcube/rcube_imap_search.php index 86b10c90a..cc1a86667 100644 --- a/program/lib/Roundcube/rcube_imap_search.php +++ b/program/lib/Roundcube/rcube_imap_search.php @@ -4,8 +4,8 @@ +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | | | - | Copyright (C) 2013, The Roundcube Dev Team | - | Copyright (C) 2014, Kolab Systems AG | + | Copyright (C) The Roundcube Dev Team | + | Copyright (C) Kolab Systems AG | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/rcube_ldap.php b/program/lib/Roundcube/rcube_ldap.php index 24ec5b992..ef2aeb7c3 100644 --- a/program/lib/Roundcube/rcube_ldap.php +++ b/program/lib/Roundcube/rcube_ldap.php @@ -3,8 +3,9 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2006-2013, The Roundcube Dev Team | - | Copyright (C) 2011-2013, Kolab Systems AG | + | | + | Copyright (C) The Roundcube Dev Team | + | Copyright (C) Kolab Systems AG | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -1017,7 +1018,7 @@ class rcube_ldap extends rcube_addressbook if ($this->ready && $dn) { $dn = self::dn_decode($dn); - if ($rec = $this->ldap->get_entry($dn)) { + if ($rec = $this->ldap->get_entry($dn, $this->prop['attributes'])) { $rec = array_change_key_case($rec, CASE_LOWER); } @@ -1538,8 +1539,15 @@ class rcube_ldap extends rcube_addressbook foreach ($fieldmap as $rf => $lf) { - for ($i=0; $i < $rec[$lf]['count']; $i++) { - if (!($value = $rec[$lf][$i])) + // we might be dealing with normalized and non-normalized data + $entry = $rec[$lf]; + if (!is_array($entry) || !isset($entry['count'])) { + $entry = (array) $entry; + $entry['count'] = count($entry); + } + + for ($i=0; $i < $entry['count']; $i++) { + if (!($value = $entry[$i])) continue; list($col, $subtype) = explode(':', $rf); @@ -1551,7 +1559,7 @@ class rcube_ldap extends rcube_addressbook $out['address' . ($subtype ? ':' : '') . $subtype][$i][$col] = $value; else if ($col == 'address' && strpos($value, '$') !== false) // address data is represented as string separated with $ list($out[$rf][$i]['street'], $out[$rf][$i]['locality'], $out[$rf][$i]['zipcode'], $out[$rf][$i]['country']) = explode('$', $value); - else if ($rec[$lf]['count'] > 1) + else if ($entry['count'] > 1) $out[$rf][] = $value; else $out[$rf] = $value; diff --git a/program/lib/Roundcube/rcube_ldap_generic.php b/program/lib/Roundcube/rcube_ldap_generic.php index a2befbea7..09ac70bf7 100644 --- a/program/lib/Roundcube/rcube_ldap_generic.php +++ b/program/lib/Roundcube/rcube_ldap_generic.php @@ -2,11 +2,10 @@ /** +-----------------------------------------------------------------------+ - | Roundcube/rcube_ldap_generic.php | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2006-2014, The Roundcube Dev Team | - | Copyright (C) 2012-2015, Kolab Systems AG | + | | + | Copyright (C) The Roundcube Dev Team | + | Copyright (C) Kolab Systems AG | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -54,19 +53,6 @@ class rcube_ldap_generic extends Net_LDAP3 return parent::connect($host); } - /** - * Get a specific LDAP entry, identified by its DN - * - * @param string $dn Record identifier - * @param array $attributes Attributes to return - * - * @return array Hash array - */ - function get_entry($dn, $attributes = array()) - { - return parent::get_entry($dn, !empty($attributes) ? $attributes : $this->attributes); - } - /** * Prints debug/error info to the log */ diff --git a/program/lib/Roundcube/rcube_message.php b/program/lib/Roundcube/rcube_message.php index aa8d6114c..fddbf702f 100644 --- a/program/lib/Roundcube/rcube_message.php +++ b/program/lib/Roundcube/rcube_message.php @@ -3,7 +3,8 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2008-2014, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/rcube_message_header.php b/program/lib/Roundcube/rcube_message_header.php index b0b958eb6..9dc2d9c58 100644 --- a/program/lib/Roundcube/rcube_message_header.php +++ b/program/lib/Roundcube/rcube_message_header.php @@ -3,8 +3,9 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2012, The Roundcube Dev Team | - | Copyright (C) 2011-2012, Kolab Systems AG | + | | + | Copyright (C) The Roundcube Dev Team | + | Copyright (C) Kolab Systems AG | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/rcube_message_part.php b/program/lib/Roundcube/rcube_message_part.php index 82f3e2411..bf8504a9a 100644 --- a/program/lib/Roundcube/rcube_message_part.php +++ b/program/lib/Roundcube/rcube_message_part.php @@ -3,8 +3,9 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2012, The Roundcube Dev Team | - | Copyright (C) 2011-2012, Kolab Systems AG | + | | + | Copyright (C) The Roundcube Dev Team | + | Copyright (C) Kolab Systems AG | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/rcube_mime.php b/program/lib/Roundcube/rcube_mime.php index e020c5faf..f1db70acd 100644 --- a/program/lib/Roundcube/rcube_mime.php +++ b/program/lib/Roundcube/rcube_mime.php @@ -3,8 +3,9 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2016, The Roundcube Dev Team | - | Copyright (C) 2011-2016, Kolab Systems AG | + | | + | Copyright (C) The Roundcube Dev Team | + | Copyright (C) Kolab Systems AG | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/rcube_mime_decode.php b/program/lib/Roundcube/rcube_mime_decode.php index ebdbbb753..739987fac 100644 --- a/program/lib/Roundcube/rcube_mime_decode.php +++ b/program/lib/Roundcube/rcube_mime_decode.php @@ -3,8 +3,9 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2015, The Roundcube Dev Team | - | Copyright (C) 2011-2015, Kolab Systems AG | + | | + | Copyright (C) The Roundcube Dev Team | + | Copyright (C) Kolab Systems AG | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/rcube_output.php b/program/lib/Roundcube/rcube_output.php index ab8fabeb1..27acc7075 100644 --- a/program/lib/Roundcube/rcube_output.php +++ b/program/lib/Roundcube/rcube_output.php @@ -2,8 +2,9 @@ /** +-----------------------------------------------------------------------+ - | This file is part of the Roundcube PHP suite | - | Copyright (C) 2005-2014 The Roundcube Dev Team | + | This file is part of the Roundcube webmail client | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/rcube_plugin.php b/program/lib/Roundcube/rcube_plugin.php index 42786a67b..b4a645442 100644 --- a/program/lib/Roundcube/rcube_plugin.php +++ b/program/lib/Roundcube/rcube_plugin.php @@ -3,7 +3,8 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2008-2014, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/rcube_plugin_api.php b/program/lib/Roundcube/rcube_plugin_api.php index 5575935dc..cea6b46d8 100644 --- a/program/lib/Roundcube/rcube_plugin_api.php +++ b/program/lib/Roundcube/rcube_plugin_api.php @@ -3,7 +3,8 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2008-2012, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/rcube_result_index.php b/program/lib/Roundcube/rcube_result_index.php index 6320bac2f..d18b63b2e 100644 --- a/program/lib/Roundcube/rcube_result_index.php +++ b/program/lib/Roundcube/rcube_result_index.php @@ -3,8 +3,9 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2011, The Roundcube Dev Team | - | Copyright (C) 2011, Kolab Systems AG | + | | + | Copyright (C) The Roundcube Dev Team | + | Copyright (C) Kolab Systems AG | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/rcube_result_multifolder.php b/program/lib/Roundcube/rcube_result_multifolder.php index 1bb153f7b..974cd76d3 100644 --- a/program/lib/Roundcube/rcube_result_multifolder.php +++ b/program/lib/Roundcube/rcube_result_multifolder.php @@ -3,8 +3,9 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2011, The Roundcube Dev Team | - | Copyright (C) 2011, Kolab Systems AG | + | | + | Copyright (C) The Roundcube Dev Team | + | Copyright (C) Kolab Systems AG | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/rcube_result_set.php b/program/lib/Roundcube/rcube_result_set.php index e4b260ad0..4494e2331 100644 --- a/program/lib/Roundcube/rcube_result_set.php +++ b/program/lib/Roundcube/rcube_result_set.php @@ -3,7 +3,8 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2006-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/rcube_result_thread.php b/program/lib/Roundcube/rcube_result_thread.php index 394fdeb01..2ebd48ca8 100644 --- a/program/lib/Roundcube/rcube_result_thread.php +++ b/program/lib/Roundcube/rcube_result_thread.php @@ -3,8 +3,9 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2011, The Roundcube Dev Team | - | Copyright (C) 2011, Kolab Systems AG | + | | + | Copyright (C) The Roundcube Dev Team | + | Copyright (C) Kolab Systems AG | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/rcube_session.php b/program/lib/Roundcube/rcube_session.php index 11f2fc749..21e9b98b9 100644 --- a/program/lib/Roundcube/rcube_session.php +++ b/program/lib/Roundcube/rcube_session.php @@ -3,8 +3,9 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2014, The Roundcube Dev Team | - | Copyright (C) 2011, Kolab Systems AG | + | | + | Copyright (C) The Roundcube Dev Team | + | Copyright (C) Kolab Systems AG | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -82,6 +83,8 @@ abstract class rcube_session } /** + * Object constructor + * * @param Object $config */ public function __construct($config) @@ -92,13 +95,13 @@ abstract class rcube_session $this->set_ip_check($this->config->get('ip_check')); // set cookie name - if ($this->config->get('session_auth_name')) { - $this->set_cookiename($this->config->get('session_auth_name')); + if ($name = $this->config->get('session_auth_name')) { + $this->set_cookiename($name); } } /** - * register session handler + * Register session handler */ public function register_session_handler() { @@ -127,7 +130,7 @@ abstract class rcube_session { $this->start = microtime(true); $this->ip = rcube_utils::remote_addr(); - $this->logging = $this->config->get('log_session', false); + $this->logging = $this->config->get('session_debug', false); $lifetime = $this->config->get('session_lifetime', 1) * 60; $this->set_lifetime($lifetime); @@ -146,12 +149,12 @@ abstract class rcube_session abstract function update($key, $newvars, $oldvars); /** - * session write handler. This calls the implementation methods for write/update after some initial checks. + * Session write handler. This calls the implementation methods for write/update after some initial checks. * - * @param $key - * @param $vars + * @param string $key Session identifier + * @param string $vars Serialized data string * - * @return bool + * @return bool True on success, False on failure */ public function sess_write($key, $vars) { @@ -188,7 +191,7 @@ abstract class rcube_session /** * Creates a new (separate) session * - * @param array Session data + * @param array $data Session data * * @return string Session identifier (on success) */ @@ -238,6 +241,10 @@ abstract class rcube_session /** * Execute registered garbage collector routines + * + * @param int $maxlifetime Maximum session lifetime + * + * @return bool True on success, False on failure */ public function gc($maxlifetime) { @@ -281,10 +288,12 @@ abstract class rcube_session * * @param boolean $destroy If enabled the current session will be destroyed * - * @return bool + * @return bool True on success, False on failure */ public function regenerate_id($destroy = true) { + $old_id = session_id(); + // Since PHP 7.0 session_regenerate_id() will cause the old // session data update, we don't need this $this->ignore_write = true; @@ -294,15 +303,17 @@ abstract class rcube_session $this->vars = null; $this->key = session_id(); + $this->log("Session regenerate: $old_id -> {$this->key}"); + return true; } /** * See if we have vars of this key already cached, and if so, return them. * - * @param string $key Session ID + * @param string $key Session identifier * - * @return string + * @return string Serialized data string */ protected function get_cache($key) { @@ -326,9 +337,9 @@ abstract class rcube_session * * Warning: Do not use if you already modified $_SESSION in the same request (#1490608) * - * @param string Path denoting the session variable where to append the value - * @param string Key name under which to append the new value (use null for appending to an indexed list) - * @param mixed Value to append to the session data array + * @param string $path Path denoting the session variable where to append the value + * @param string $key Key name under which to append the new value (use null for appending to an indexed list) + * @param mixed $value Value to append to the session data array */ public function append($path, $key, $value) { @@ -360,10 +371,12 @@ abstract class rcube_session /** * Unset a session variable * - * @param string Variable name (can be a path denoting a certain node in the session array, e.g. compose.attachments.5) - * @return boolean True on success + * @param string $var Variable name (can be a path denoting a certain node + * in the session array, e.g. compose.attachments.5) + * + * @return boolean True on success, False on failure */ - public function remove($var=null) + public function remove($var = null) { if (empty($var)) { return $this->destroy(session_id()); @@ -389,9 +402,12 @@ abstract class rcube_session */ public function kill() { + $this->log("Session destroy: " . session_id()); + $this->vars = null; $this->ip = rcube_utils::remote_addr(); // update IP (might have changed) $this->destroy(session_id()); + rcube_utils::setcookie($this->cookiename, '-del-', time() - 60); } @@ -472,6 +488,10 @@ abstract class rcube_session /** * Unserialize session data * http://www.php.net/manual/en/function.session-decode.php#56106 + * + * @param string $str Serialized data string + * + * @return array Unserialized data */ public static function unserialize($str) { @@ -564,11 +584,13 @@ abstract class rcube_session $p = $q; } - return unserialize( 'a:' . $items . ':{' . $serialized . '}' ); + return unserialize('a:' . $items . ':{' . $serialized . '}'); } /** * Setter for session lifetime + * + * @param int $lifetime Session lifetime (in seconds) */ public function set_lifetime($lifetime) { @@ -581,6 +603,8 @@ abstract class rcube_session /** * Getter for remote IP saved with this session + * + * @return string Client IP address */ public function get_ip() { @@ -589,6 +613,8 @@ abstract class rcube_session /** * Setter for cookie encryption secret + * + * @param string $secret Authentication secret string */ function set_secret($secret = null) { @@ -607,6 +633,8 @@ abstract class rcube_session /** * Enable/disable IP check + * + * @param bool $check IP address checking state */ function set_ip_check($check) { @@ -615,11 +643,13 @@ abstract class rcube_session /** * Setter for the cookie name used for session cookie + * + * @param string $name Authentication cookie name */ - function set_cookiename($cookiename) + function set_cookiename($name) { - if ($cookiename) { - $this->cookiename = $cookiename; + if ($name) { + $this->cookiename = $name; } } @@ -673,9 +703,9 @@ abstract class rcube_session /** * Create session cookie for specified time slot. * - * @param int Time slot to use + * @param int $timeslot Time slot to use * - * @return string + * @return string Cookie value */ protected function _mkcookie($timeslot) { @@ -688,6 +718,8 @@ abstract class rcube_session /** * Writes debug information to the log + * + * @param string Log line */ function log($line) { diff --git a/program/lib/Roundcube/rcube_smtp.php b/program/lib/Roundcube/rcube_smtp.php index 4831caed3..3c76c3c5f 100644 --- a/program/lib/Roundcube/rcube_smtp.php +++ b/program/lib/Roundcube/rcube_smtp.php @@ -3,7 +3,8 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2012, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/rcube_spellchecker.php b/program/lib/Roundcube/rcube_spellchecker.php index 88d8282c7..c70a7e82c 100644 --- a/program/lib/Roundcube/rcube_spellchecker.php +++ b/program/lib/Roundcube/rcube_spellchecker.php @@ -3,8 +3,9 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2011-2013, Kolab Systems AG | - | Copyright (C) 2008-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | + | Copyright (C) Kolab Systems AG | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/rcube_storage.php b/program/lib/Roundcube/rcube_storage.php index be0987669..b7f8b2c8c 100644 --- a/program/lib/Roundcube/rcube_storage.php +++ b/program/lib/Roundcube/rcube_storage.php @@ -3,8 +3,9 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2012, The Roundcube Dev Team | - | Copyright (C) 2012, Kolab Systems AG | + | | + | Copyright (C) The Roundcube Dev Team | + | Copyright (C) Kolab Systems AG | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/rcube_string_replacer.php b/program/lib/Roundcube/rcube_string_replacer.php index 284d58547..2768bbc5b 100644 --- a/program/lib/Roundcube/rcube_string_replacer.php +++ b/program/lib/Roundcube/rcube_string_replacer.php @@ -3,7 +3,8 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2009-2012, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/rcube_text2html.php b/program/lib/Roundcube/rcube_text2html.php index ce8c37799..594de816c 100644 --- a/program/lib/Roundcube/rcube_text2html.php +++ b/program/lib/Roundcube/rcube_text2html.php @@ -3,7 +3,8 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2008-2014, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/rcube_tnef_decoder.php b/program/lib/Roundcube/rcube_tnef_decoder.php index 12b291344..2cd920c4c 100644 --- a/program/lib/Roundcube/rcube_tnef_decoder.php +++ b/program/lib/Roundcube/rcube_tnef_decoder.php @@ -3,7 +3,8 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2008-2017, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | Copyright (C) 2002-2010, The Horde Project (http://www.horde.org/) | | | | Licensed under the GNU General Public License version 3 or | diff --git a/program/lib/Roundcube/rcube_user.php b/program/lib/Roundcube/rcube_user.php index caa2e086e..931be420f 100644 --- a/program/lib/Roundcube/rcube_user.php +++ b/program/lib/Roundcube/rcube_user.php @@ -3,7 +3,8 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2012, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/rcube_utils.php b/program/lib/Roundcube/rcube_utils.php index 95e2897cb..e86f3c780 100644 --- a/program/lib/Roundcube/rcube_utils.php +++ b/program/lib/Roundcube/rcube_utils.php @@ -3,8 +3,9 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2008-2012, The Roundcube Dev Team | - | Copyright (C) 2011-2012, Kolab Systems AG | + | | + | Copyright (C) The Roundcube Dev Team | + | Copyright (C) Kolab Systems AG | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/rcube_vcard.php b/program/lib/Roundcube/rcube_vcard.php index 5610667af..edc5a8c8b 100644 --- a/program/lib/Roundcube/rcube_vcard.php +++ b/program/lib/Roundcube/rcube_vcard.php @@ -3,7 +3,8 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2008-2012, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -182,7 +183,9 @@ class rcube_vcard $subtype = ''; if (!empty($raw['type'])) { - $combined = join(',', self::array_filter((array)$raw['type'], 'internet,pref', true)); + $raw['type'] = array_map('strtolower', $raw['type']); + + $combined = join(',', array_diff($raw['type'], array('internet', 'pref'))); $combined = strtoupper($combined); if ($typemap[$combined]) { @@ -192,11 +195,11 @@ class rcube_vcard $subtype = $typemap[$raw['type'][$k]]; } else { - $subtype = strtolower($raw['type'][$k]); + $subtype = $raw['type'][$k]; } while ($k < count($raw['type']) && ($subtype == 'internet' || $subtype == 'pref')) { - $subtype = $typemap[$raw['type'][++$k]] ?: strtolower($raw['type'][$k]); + $subtype = $typemap[$raw['type'][++$k]] ?: $raw['type'][$k]; } } @@ -848,14 +851,14 @@ class rcube_vcard * Check if vCard entry is empty: empty string or an array with * all entries empty. * - * @param mixed $value Attribute value (string or array) + * @param string|array $value Attribute value * * @return bool True if the value is empty, False otherwise */ private static function is_empty($value) { foreach ((array)$value as $v) { - if (((string)$v) !== '') { + if (strval($v) !== '') { return false; } } @@ -863,33 +866,6 @@ class rcube_vcard return true; } - /** - * Extract array values by a filter - * - * @param array Array to filter - * @param keys Array or comma separated list of values to keep - * @param boolean Invert key selection: remove the listed values - * - * @return array The filtered array - */ - private static function array_filter($arr, $values, $inverse = false) - { - if (!is_array($values)) { - $values = explode(',', $values); - } - - $result = array(); - $keep = array_flip((array)$values); - - foreach ($arr as $key => $val) { - if ($inverse != isset($keep[strtolower($val)])) { - $result[$key] = $val; - } - } - - return $result; - } - /** * Returns UNICODE type based on BOM (Byte Order Mark) * diff --git a/program/lib/Roundcube/rcube_washtml.php b/program/lib/Roundcube/rcube_washtml.php index 497a1c3e4..513bacef4 100644 --- a/program/lib/Roundcube/rcube_washtml.php +++ b/program/lib/Roundcube/rcube_washtml.php @@ -3,7 +3,8 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2008-2012, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -16,68 +17,66 @@ | Author: Aleksander Machniak | | Author: Frederic Motte | +-----------------------------------------------------------------------+ - */ -/* - * Washtml, a HTML sanityzer. - * - * Copyright (c) 2007 Frederic Motte - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * OVERVIEW: - * - * Wahstml take an untrusted HTML and return a safe html string. - * - * SYNOPSIS: - * - * $washer = new washtml($config); - * $washer->wash($html); - * It return a sanityzed string of the $html parameter without html and head tags. - * $html is a string containing the html code to wash. - * $config is an array containing options: - * $config['allow_remote'] is a boolean to allow link to remote resources (images/css). - * $config['blocked_src'] string with image-src to be used for blocked remote images - * $config['show_washed'] is a boolean to include washed out attributes as x-washed - * $config['cid_map'] is an array where cid urls index urls to replace them. - * $config['charset'] is a string containing the charset of the HTML document if it is not defined in it. - * $washer->extlinks is a reference to a boolean that is set to true if remote images were removed. (FE: show remote images link) - * - * INTERNALS: - * - * Only tags and attributes in the static lists $html_elements and $html_attributes - * are kept, inline styles are also filtered: all style identifiers matching - * /[a-z\-]/i are allowed. Values matching colors, sizes, /[a-z\-]/i and safe - * urls if allowed and cid urls if mapped are kept. - * - * Roundcube Changes: - * - added $block_elements - * - changed $ignore_elements behaviour - * - added RFC2397 support - * - base URL support - * - invalid HTML comments removal before parsing - * - "fixing" unitless CSS values for XHTML output - * - SVG and MathML support - */ + Washtml, a HTML sanityzer. + + Copyright (c) 2007 Frederic Motte + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + OVERVIEW: + + Wahstml take an untrusted HTML and return a safe html string. + + SYNOPSIS: + + $washer = new washtml($config); + $washer->wash($html); + It return a sanityzed string of the $html parameter without html and head tags. + $html is a string containing the html code to wash. + $config is an array containing options: + $config['allow_remote'] is a boolean to allow link to remote resources (images/css). + $config['blocked_src'] string with image-src to be used for blocked remote images + $config['show_washed'] is a boolean to include washed out attributes as x-washed + $config['cid_map'] is an array where cid urls index urls to replace them. + $config['charset'] is a string containing the charset of the HTML document if it is not defined in it. + $washer->extlinks is a reference to a boolean that is set to true if remote images were removed. (FE: show remote images link) + + INTERNALS: + + Only tags and attributes in the static lists $html_elements and $html_attributes + are kept, inline styles are also filtered: all style identifiers matching + /[a-z\-]/i are allowed. Values matching colors, sizes, /[a-z\-]/i and safe + urls if allowed and cid urls if mapped are kept. + + Roundcube Changes: + - added $block_elements + - changed $ignore_elements behaviour + - added RFC2397 support + - base URL support + - invalid HTML comments removal before parsing + - "fixing" unitless CSS values for XHTML output + - SVG and MathML support +*/ /** * Utility class providing HTML sanityzer @@ -562,7 +561,7 @@ class rcube_washtml if (!$this->is_xml && class_exists('Masterminds\HTML5')) { try { $html5 = new Masterminds\HTML5(); - $node = $html5->loadHTML($html); + $node = $html5->loadHTML($this->fix_html5($html)); } catch (Exception $e) { // ignore, fallback to DOMDocument @@ -605,6 +604,8 @@ class rcube_washtml '/^(\0\0\xFE\xFF|\xFF\xFE\0\0|\xFE\xFF|\xFF\xFE|\xEF\xBB\xBF)/', // washtml/DOMDocument cannot handle xml namespaces '/]+>/i', + // washtml/DOMDocument cannot handle xml namespaces + '/<\?xml:namespace\s[^>]+>/i', ); $html_replace = array( @@ -613,6 +614,7 @@ class rcube_washtml '', '', '', + '', ); $html = preg_replace($html_search, $html_replace, $html); @@ -775,6 +777,28 @@ class rcube_washtml } } + /** + * Cleanup and workarounds on input to Masterminds/HTML5 + */ + protected function fix_html5($html) + { + // HTML5 requires or (#6713) + // https://github.com/Masterminds/html5-php/issues/166 + if (!preg_match('/<(head|body)/i', $html)) { + $pos = stripos($html, '', $pos); + $html = substr_replace($html, '', $pos + 1, 0); + } + } + + return $html; + } + /** * Explode css style value */ diff --git a/program/lib/Roundcube/session/db.php b/program/lib/Roundcube/session/db.php index 269a80c12..a00d6bce6 100644 --- a/program/lib/Roundcube/session/db.php +++ b/program/lib/Roundcube/session/db.php @@ -3,8 +3,9 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2014, The Roundcube Dev Team | - | Copyright (C) 2011, Kolab Systems AG | + | | + | Copyright (C) The Roundcube Dev Team | + | Copyright (C) Kolab Systems AG | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -34,7 +35,9 @@ class rcube_session_db extends rcube_session private $table_name; /** - * @param Object $config + * Object constructor + * + * @param rcube_config $config Configuration */ public function __construct($config) { @@ -54,9 +57,12 @@ class rcube_session_db extends rcube_session } /** - * @param $save_path - * @param $session_name - * @return bool + * Opens the session + * + * @param string $save_path Session save path + * @param string $session_name Session name + * + * @return bool True on success, False on failure */ public function open($save_path, $session_name) { @@ -64,7 +70,9 @@ class rcube_session_db extends rcube_session } /** - * @return bool + * Close the session + * + * @return bool True on success, False on failure */ public function close() { @@ -72,10 +80,11 @@ class rcube_session_db extends rcube_session } /** - * Handler for session_destroy() + * Destroy the session + * + * @param string $key Session identifier * - * @param $key - * @return bool + * @return bool True on success, False on failure */ public function destroy($key) { @@ -89,9 +98,9 @@ class rcube_session_db extends rcube_session /** * Read session data from database * - * @param string Session ID + * @param string $key Session identifier * - * @return string Session vars + * @return string Session vars (serialized string) */ public function read($key) { @@ -115,11 +124,12 @@ class rcube_session_db extends rcube_session } /** - * insert new data into db session store + * Insert new data into db session store + * + * @param string $key Session identifier + * @param string $vars Serialized data string * - * @param $key - * @param $vars - * @return bool + * @return bool True on success, False on failure */ public function write($key, $vars) { @@ -138,13 +148,13 @@ class rcube_session_db extends rcube_session } /** - * update session data + * Update session data * - * @param $key - * @param $newvars - * @param $oldvars + * @param string $key Session identifier + * @param string $newvars New session data string + * @param string $oldvars Old session data string * - * @return bool + * @return bool True on success, False on failure */ public function update($key, $newvars, $oldvars) { diff --git a/program/lib/Roundcube/session/memcache.php b/program/lib/Roundcube/session/memcache.php index 8210bd6d2..2e917cabc 100644 --- a/program/lib/Roundcube/session/memcache.php +++ b/program/lib/Roundcube/session/memcache.php @@ -3,8 +3,9 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2014, The Roundcube Dev Team | - | Copyright (C) 2011, Kolab Systems AG | + | | + | Copyright (C) The Roundcube Dev Team | + | Copyright (C) Kolab Systems AG | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -34,7 +35,9 @@ class rcube_session_memcache extends rcube_session private $debug; /** - * @param Object $config + * Object constructor + * + * @param rcube_config $config Configuration */ public function __construct($config) { @@ -56,9 +59,12 @@ class rcube_session_memcache extends rcube_session } /** - * @param $save_path - * @param $session_name - * @return bool + * Opens the session + * + * @param string $save_path Session save path + * @param string $session_name Session name + * + * @return bool True on success, False on failure */ public function open($save_path, $session_name) { @@ -66,7 +72,9 @@ class rcube_session_memcache extends rcube_session } /** - * @return bool + * Close the session + * + * @return bool True on success, False on failure */ public function close() { @@ -74,10 +82,11 @@ class rcube_session_memcache extends rcube_session } /** - * Handler for session_destroy() with memcache backend + * Destroy the session + * + * @param string $key Session identifier * - * @param $key - * @return bool + * @return bool True on success, False on failure */ public function destroy($key) { @@ -96,8 +105,9 @@ class rcube_session_memcache extends rcube_session /** * Read session data from memcache * - * @param $key - * @return null|string + * @param string $key Session identifier + * + * @return string Serialized data string */ public function read($key) { @@ -119,10 +129,10 @@ class rcube_session_memcache extends rcube_session /** * Write data to memcache storage * - * @param $key - * @param $vars + * @param string $key Session identifier + * @param string $vars Session data string * - * @return bool + * @return bool True on success, False on failure */ public function write($key, $vars) { @@ -143,11 +153,11 @@ class rcube_session_memcache extends rcube_session /** * Update memcache session data * - * @param $key - * @param $newvars - * @param $oldvars + * @param string $key Session identifier + * @param string $newvars New session data string + * @param string $oldvars Old session data string * - * @return bool + * @return bool True on success, False on failure */ public function update($key, $newvars, $oldvars) { @@ -169,6 +179,11 @@ class rcube_session_memcache extends rcube_session /** * Write memcache debug info to the log + * + * @param string $type Operation type + * @param string $key Session identifier + * @param string $data Data to log + * @param bool $result Opearation result */ protected function debug($type, $key, $data = null, $result = null) { diff --git a/program/lib/Roundcube/session/php.php b/program/lib/Roundcube/session/php.php index 67b1dce7a..86ca5aa14 100644 --- a/program/lib/Roundcube/session/php.php +++ b/program/lib/Roundcube/session/php.php @@ -3,8 +3,9 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2014, The Roundcube Dev Team | - | Copyright (C) 2011, Kolab Systems AG | + | | + | Copyright (C) The Roundcube Dev Team | + | Copyright (C) Kolab Systems AG | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -31,8 +32,8 @@ class rcube_session_php extends rcube_session { /** - * native php sessions don't need a save handler - * we do need to define abstract function implementations but they are not used. + * Native php sessions don't need a save handler. + * We do need to define abstract function implementations but they are not used. */ public function open($save_path, $session_name) {} @@ -43,7 +44,9 @@ class rcube_session_php extends rcube_session { public function update($key, $newvars, $oldvars) {} /** - * @param Object $config + * Object constructor + * + * @param rcube_config $config Configuration */ public function __construct($config) { diff --git a/program/lib/Roundcube/session/redis.php b/program/lib/Roundcube/session/redis.php index 8a810571d..227b6ed98 100644 --- a/program/lib/Roundcube/session/redis.php +++ b/program/lib/Roundcube/session/redis.php @@ -3,7 +3,8 @@ /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2018, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -30,7 +31,9 @@ class rcube_session_redis extends rcube_session { private $debug; /** - * @param rcube_config $config + * Object constructor + * + * @param rcube_config $config Configuration */ public function __construct($config) { @@ -44,9 +47,12 @@ class rcube_session_redis extends rcube_session { } /** - * @param $save_path - * @param $session_name - * @return bool + * Opens the session + * + * @param string $save_path Session save path + * @param string $session_name Session name + * + * @return bool True on success, False on failure */ public function open($save_path, $session_name) { @@ -54,7 +60,9 @@ class rcube_session_redis extends rcube_session { } /** - * @return bool + * Close the session + * + * @return bool True on success, False on failure */ public function close() { @@ -62,10 +70,11 @@ class rcube_session_redis extends rcube_session { } /** - * remove data from store + * Destroy the session * - * @param $key - * @return bool + * @param string $key Session identifier + * + * @return bool True on success, False on failure */ public function destroy($key) { @@ -81,10 +90,11 @@ class rcube_session_redis extends rcube_session { } /** - * read data from redis store + * Read data from redis store + * + * @param string $key Session identifier * - * @param $key - * @return string + * @return string Serialized data string */ public function read($key) { @@ -104,12 +114,13 @@ class rcube_session_redis extends rcube_session { } /** - * write data to redis store + * Write data to redis store + * + * @param string $key Session identifier + * @param string $newvars New session data string + * @param string $oldvars Old session data string * - * @param $key - * @param $newvars - * @param $oldvars - * @return bool + * @return bool True on success, False on failure */ public function update($key, $newvars, $oldvars) { @@ -130,11 +141,12 @@ class rcube_session_redis extends rcube_session { } /** - * write data to redis store + * Write data to redis store * - * @param $key - * @param $vars - * @return bool + * @param string $key Session identifier + * @param array $vars Session data + * + * @return bool True on success, False on failure */ public function write($key, $vars) { @@ -154,6 +166,11 @@ class rcube_session_redis extends rcube_session { /** * Write memcache debug info to the log + * + * @param string $type Operation type + * @param string $key Session identifier + * @param string $data Data to log + * @param bool $result Opearation result */ protected function debug($type, $key, $data = null, $result = null) { diff --git a/program/lib/Roundcube/spellchecker/atd.php b/program/lib/Roundcube/spellchecker/atd.php index c8e924355..4708e70c7 100644 --- a/program/lib/Roundcube/spellchecker/atd.php +++ b/program/lib/Roundcube/spellchecker/atd.php @@ -4,7 +4,7 @@ +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | | | - | Copyright (C) 2013, The Roundcube Dev Team | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/spellchecker/enchant.php b/program/lib/Roundcube/spellchecker/enchant.php index b0bdf7313..4287a9753 100644 --- a/program/lib/Roundcube/spellchecker/enchant.php +++ b/program/lib/Roundcube/spellchecker/enchant.php @@ -4,8 +4,8 @@ +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | | | - | Copyright (C) 2011-2013, Kolab Systems AG | - | Copyright (C) 20011-2013, The Roundcube Dev Team | + | Copyright (C) The Roundcube Dev Team | + | Copyright (C) Kolab Systems AG | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/spellchecker/engine.php b/program/lib/Roundcube/spellchecker/engine.php index 3fc9f4371..acf99cfe1 100644 --- a/program/lib/Roundcube/spellchecker/engine.php +++ b/program/lib/Roundcube/spellchecker/engine.php @@ -4,8 +4,8 @@ +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | | | - | Copyright (C) 2011-2013, Kolab Systems AG | - | Copyright (C) 2008-2013, The Roundcube Dev Team | + | Copyright (C) The Roundcube Dev Team | + | Copyright (C) Kolab Systems AG | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/spellchecker/googie.php b/program/lib/Roundcube/spellchecker/googie.php index a1387256b..d1144e778 100644 --- a/program/lib/Roundcube/spellchecker/googie.php +++ b/program/lib/Roundcube/spellchecker/googie.php @@ -4,7 +4,7 @@ +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | | | - | Copyright (C) 2008-2013, The Roundcube Dev Team | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/lib/Roundcube/spellchecker/pspell.php b/program/lib/Roundcube/spellchecker/pspell.php index d5f9235d4..a91c53f56 100644 --- a/program/lib/Roundcube/spellchecker/pspell.php +++ b/program/lib/Roundcube/spellchecker/pspell.php @@ -4,7 +4,7 @@ +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | | | - | Copyright (C) 2008-2013, The Roundcube Dev Team | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/localization/en_US/csv2vcard.inc b/program/localization/en_US/csv2vcard.inc index 67a1757d6..34231f97a 100644 --- a/program/localization/en_US/csv2vcard.inc +++ b/program/localization/en_US/csv2vcard.inc @@ -2,17 +2,13 @@ /* +-----------------------------------------------------------------------+ - | localization//csv2vcard.inc | - | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2015, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | | See the README file for a full license statement. | - | | - +-----------------------------------------------------------------------+ - | Author: Aleksander Machniak | +-----------------------------------------------------------------------+ */ diff --git a/program/localization/en_US/labels.inc b/program/localization/en_US/labels.inc index 046103c4e..3c46bf390 100644 --- a/program/localization/en_US/labels.inc +++ b/program/localization/en_US/labels.inc @@ -2,15 +2,13 @@ /* +-----------------------------------------------------------------------+ - | localization//labels.inc | - | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2015, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | | See the README file for a full license statement. | - | | +-----------------------------------------------------------------------+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/labels/ diff --git a/program/localization/en_US/messages.inc b/program/localization/en_US/messages.inc index 7b3356354..142d45ffc 100644 --- a/program/localization/en_US/messages.inc +++ b/program/localization/en_US/messages.inc @@ -2,15 +2,13 @@ /* +-----------------------------------------------------------------------+ - | localization//messages.inc | - | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2015, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | | See the README file for a full license statement. | - | | +-----------------------------------------------------------------------+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/messages/ @@ -21,6 +19,7 @@ $messages['errortitle'] = 'An error occurred!'; $messages['loginfailed'] = 'Login failed.'; $messages['cookiesdisabled'] = 'Your browser does not accept cookies.'; $messages['sessionerror'] = 'Your session is invalid or expired.'; +$messages['cookiesmismatch'] = 'Cookies mismatch detected. Clear cookies in your browser, please.'; $messages['storageerror'] = 'Connection to storage server failed.'; $messages['servererror'] = 'Server Error!'; $messages['servererrormsg'] = 'Server Error: $msg'; diff --git a/program/localization/en_US/timezones.inc b/program/localization/en_US/timezones.inc index 9ff3cc255..0e58adbb9 100644 --- a/program/localization/en_US/timezones.inc +++ b/program/localization/en_US/timezones.inc @@ -2,10 +2,9 @@ /* +-----------------------------------------------------------------------+ - | localization//timezones.inc | - | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2017, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/steps/addressbook/copy.inc b/program/steps/addressbook/copy.inc index 927521e74..4bf896822 100644 --- a/program/steps/addressbook/copy.inc +++ b/program/steps/addressbook/copy.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/addressbook/copy.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2007-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Copy a contact record from one direcotry to another | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ diff --git a/program/steps/addressbook/delete.inc b/program/steps/addressbook/delete.inc index d600c4a88..32e8ce8be 100644 --- a/program/steps/addressbook/delete.inc +++ b/program/steps/addressbook/delete.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/addressbook/delete.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Delete the submitted contacts (CIDs) from the users address book | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ diff --git a/program/steps/addressbook/edit.inc b/program/steps/addressbook/edit.inc index 878a6080d..78d3c2ad1 100644 --- a/program/steps/addressbook/edit.inc +++ b/program/steps/addressbook/edit.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/addressbook/edit.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Show edit form for a contact entry or to add a new one | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ diff --git a/program/steps/addressbook/export.inc b/program/steps/addressbook/export.inc index 84c35f642..3959bfada 100644 --- a/program/steps/addressbook/export.inc +++ b/program/steps/addressbook/export.inc @@ -2,11 +2,10 @@ /** +-----------------------------------------------------------------------+ - | program/steps/addressbook/export.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2008-2013, The Roundcube Dev Team | - | Copyright (C) 2011-2013, Kolab Systems AG | + | | + | Copyright (C) The Roundcube Dev Team | + | Copyright (C) Kolab Systems AG | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -14,7 +13,6 @@ | | | PURPOSE: | | Export the selected address book as vCard file | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | | Author: Aleksander Machniak | diff --git a/program/steps/addressbook/func.inc b/program/steps/addressbook/func.inc index bdc513937..3e4ce4d9f 100644 --- a/program/steps/addressbook/func.inc +++ b/program/steps/addressbook/func.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/addressbook/func.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Provide addressbook functionality and GUI objects | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ diff --git a/program/steps/addressbook/groups.inc b/program/steps/addressbook/groups.inc index f4ddc5e1f..33b8627b9 100644 --- a/program/steps/addressbook/groups.inc +++ b/program/steps/addressbook/groups.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/addressbook/groups.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2010-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Create/delete/rename contact groups and assign/remove contacts | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ diff --git a/program/steps/addressbook/import.inc b/program/steps/addressbook/import.inc index f5e6d62b6..347cf7f69 100644 --- a/program/steps/addressbook/import.inc +++ b/program/steps/addressbook/import.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/addressbook/import.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2008-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Import contacts from a vCard or CSV file | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | | Author: Aleksander Machniak | diff --git a/program/steps/addressbook/list.inc b/program/steps/addressbook/list.inc index 9841088ff..bf33b2483 100644 --- a/program/steps/addressbook/list.inc +++ b/program/steps/addressbook/list.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/addressbook/list.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2012, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Send contacts list to client (as remote response) | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ diff --git a/program/steps/addressbook/mailto.inc b/program/steps/addressbook/mailto.inc index 3cde674aa..81fa14d5d 100644 --- a/program/steps/addressbook/mailto.inc +++ b/program/steps/addressbook/mailto.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/addressbook/mailto.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2007-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Compose a recipient list with all selected contacts | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ diff --git a/program/steps/addressbook/move.inc b/program/steps/addressbook/move.inc index 998d96cfd..0de7d31d0 100644 --- a/program/steps/addressbook/move.inc +++ b/program/steps/addressbook/move.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/addressbook/move.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2007-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/steps/addressbook/photo.inc b/program/steps/addressbook/photo.inc index 1d3d9506f..62b014ece 100644 --- a/program/steps/addressbook/photo.inc +++ b/program/steps/addressbook/photo.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/addressbook/photo.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Show contact photo | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | | Author: Aleksander Machniak | diff --git a/program/steps/addressbook/print.inc b/program/steps/addressbook/print.inc index cb045b1fd..a14517b2e 100644 --- a/program/steps/addressbook/print.inc +++ b/program/steps/addressbook/print.inc @@ -2,11 +2,10 @@ /** +-----------------------------------------------------------------------+ - | program/steps/addressbook/print.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2015, The Roundcube Dev Team | - | Copyright (C) 2011-2015, Kolab Systems AG | + | | + | Copyright (C) The Roundcube Dev Team | + | Copyright (C) Kolab Systems AG | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -14,7 +13,6 @@ | | | PURPOSE: | | Print contact details | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | | Author: Aleksander Machniak | diff --git a/program/steps/addressbook/qrcode.inc b/program/steps/addressbook/qrcode.inc index 73f098956..26e7da118 100644 --- a/program/steps/addressbook/qrcode.inc +++ b/program/steps/addressbook/qrcode.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/addressbook/qrcode.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2016, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Show contact data as QR code | - | | +-----------------------------------------------------------------------+ | Author: Aleksander Machniak | +-----------------------------------------------------------------------+ diff --git a/program/steps/addressbook/save.inc b/program/steps/addressbook/save.inc index 49759ff69..b91b5190e 100644 --- a/program/steps/addressbook/save.inc +++ b/program/steps/addressbook/save.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/addressbook/save.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Save a contact entry or to add a new one | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ diff --git a/program/steps/addressbook/search.inc b/program/steps/addressbook/search.inc index b370a5b6b..a8147d6bf 100644 --- a/program/steps/addressbook/search.inc +++ b/program/steps/addressbook/search.inc @@ -2,11 +2,10 @@ /** +-----------------------------------------------------------------------+ - | program/steps/addressbook/search.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2011, The Roundcube Dev Team | - | Copyright (C) 2011, Kolab Systems AG | + | | + | Copyright (C) The Roundcube Dev Team | + | Copyright (C) Kolab Systems AG | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -14,7 +13,6 @@ | | | PURPOSE: | | Search action (and form) for address book contacts | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | | Author: Aleksander Machniak | diff --git a/program/steps/addressbook/show.inc b/program/steps/addressbook/show.inc index e8e3712b6..ee5c58802 100644 --- a/program/steps/addressbook/show.inc +++ b/program/steps/addressbook/show.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/addressbook/show.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Show contact details | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ diff --git a/program/steps/addressbook/undo.inc b/program/steps/addressbook/undo.inc index 973bfec99..0d1f21715 100644 --- a/program/steps/addressbook/undo.inc +++ b/program/steps/addressbook/undo.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/addressbook/undo.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2011-2013, Kolab Systems AG | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Undelete contacts (CIDs) from last delete action | - | | +-----------------------------------------------------------------------+ | Author: Aleksander Machniak | +-----------------------------------------------------------------------+ diff --git a/program/steps/addressbook/upload_photo.inc b/program/steps/addressbook/upload_photo.inc index 745c3f1a4..22bf3b5d7 100644 --- a/program/steps/addressbook/upload_photo.inc +++ b/program/steps/addressbook/upload_photo.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/addressbook/upload_photo.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2011, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Handles contact photo uploads | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ diff --git a/program/steps/mail/addcontact.inc b/program/steps/mail/addcontact.inc index 1f54c6dc6..3193b4177 100644 --- a/program/steps/mail/addcontact.inc +++ b/program/steps/mail/addcontact.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/mail/addcontact.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Add the submitted contact to the users address book | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ diff --git a/program/steps/mail/attachments.inc b/program/steps/mail/attachments.inc index e5a07217a..9a8049355 100644 --- a/program/steps/mail/attachments.inc +++ b/program/steps/mail/attachments.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/mail/attachments.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Upload, remove, display attachments in compose form | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ diff --git a/program/steps/mail/autocomplete.inc b/program/steps/mail/autocomplete.inc index 380b3b21d..0a0b47cc3 100644 --- a/program/steps/mail/autocomplete.inc +++ b/program/steps/mail/autocomplete.inc @@ -2,11 +2,10 @@ /** +-----------------------------------------------------------------------+ - | program/steps/mail/autocomplete.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2008-2013, Roundcube Dev Team | - | Copyright (C) 2011-2013, Kolab Systems AG | + | | + | Copyright (C) The Roundcube Dev Team | + | Copyright (C) Kolab Systems AG | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/steps/mail/bounce.inc b/program/steps/mail/bounce.inc index bfdb6a5b2..fbe814449 100644 --- a/program/steps/mail/bounce.inc +++ b/program/steps/mail/bounce.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/mail/bounce.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2017, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/steps/mail/check_recent.inc b/program/steps/mail/check_recent.inc index dd6e488a4..2022cc3ae 100644 --- a/program/steps/mail/check_recent.inc +++ b/program/steps/mail/check_recent.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/mail/check_recent.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2014, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Check for recent messages, in all mailboxes | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index 76e4486af..0b0a7b2d6 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/mail/compose.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2017, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Compose a new mail message with all headers and attachments | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ diff --git a/program/steps/mail/copy.inc b/program/steps/mail/copy.inc index d8212757a..a4521e611 100644 --- a/program/steps/mail/copy.inc +++ b/program/steps/mail/copy.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/mail/copy.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2014, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Copy the submitted messages to a specific mailbox | - | | +-----------------------------------------------------------------------+ | Author: Aleksander Machniak | +-----------------------------------------------------------------------+ diff --git a/program/steps/mail/folders.inc b/program/steps/mail/folders.inc index 4c5be4f99..54fd894b7 100644 --- a/program/steps/mail/folders.inc +++ b/program/steps/mail/folders.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/mail/folders.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Implement folder operations line EXPUNGE and Clear | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index 26b038401..19aa8874b 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/mail/func.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2014, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Provide webmail functionality and GUI objects | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | | Author: Aleksander Machniak | @@ -838,15 +836,24 @@ function rcmail_wash_html($html, $p, $cid_replaces = array()) // charset was converted to UTF-8 in rcube_storage::get_message_part(), // change/add charset specification in HTML accordingly, - // washtml cannot work without that - $meta = ''; + // washtml's DOMDocument methods cannot work without that + $meta = ''; // remove old meta tag and add the new one, making sure // that it is placed in the head (#1488093) - $html = preg_replace('/]+charset=[a-z0-9-_]+[^>]*>/Ui', '', $html); - $html = preg_replace('/(]*>)/Ui', '\\1'.$meta, $html, -1, $rcount); + $html = preg_replace('/]+charset=[a-z0-9_"-]+[^>]*>/Ui', $meta, $html, -1, $rcount); + if (!$rcount) { + $html = preg_replace('/(]*>)/Ui', '\\1'.$meta, $html, -1, $rcount); + } if (!$rcount) { - $html = '' . $meta . '' . $html; + // Note: HTML without tag may still be a valid input (#6713) + if (($pos = stripos($html, '' . $html; + } + else { + $pos = strpos($html, '>', $pos); + $html = substr_replace($html, '' . $meta . '', $pos + 1, 0); + } } // clean HTML with washhtml by Frederic Motte diff --git a/program/steps/mail/get.inc b/program/steps/mail/get.inc index c757dcb52..3a22d978c 100644 --- a/program/steps/mail/get.inc +++ b/program/steps/mail/get.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/mail/get.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2016, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Delivering a specific uploaded file or mail message attachment | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | | Author: Aleksander Machniak | diff --git a/program/steps/mail/getunread.inc b/program/steps/mail/getunread.inc index a686e8b6e..f7909db10 100644 --- a/program/steps/mail/getunread.inc +++ b/program/steps/mail/getunread.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/mail/getunread.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Check all mailboxes for unread messages and update GUI | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ diff --git a/program/steps/mail/headers.inc b/program/steps/mail/headers.inc index 5274586ae..ff139bedc 100644 --- a/program/steps/mail/headers.inc +++ b/program/steps/mail/headers.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/mail/headers.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2016, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Fetch message headers in raw format for display | - | | +-----------------------------------------------------------------------+ | Author: Aleksander Machniak | +-----------------------------------------------------------------------+ diff --git a/program/steps/mail/import.inc b/program/steps/mail/import.inc index 98a62063b..995c12f75 100644 --- a/program/steps/mail/import.inc +++ b/program/steps/mail/import.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/mail/import.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2014, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Save the uploaded file(s) as messages to the current IMAP folder | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | | Author: Aleksander Machniak | diff --git a/program/steps/mail/list.inc b/program/steps/mail/list.inc index 215d09e73..a40c782e7 100644 --- a/program/steps/mail/list.inc +++ b/program/steps/mail/list.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/mail/list.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2014, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Send message list to client (as remote response) | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ diff --git a/program/steps/mail/list_contacts.inc b/program/steps/mail/list_contacts.inc index 7f13b6d62..313f1a5d3 100644 --- a/program/steps/mail/list_contacts.inc +++ b/program/steps/mail/list_contacts.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/mail/list_contacts.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2012-2014, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Send contacts list to client (as remote response) | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ diff --git a/program/steps/mail/mark.inc b/program/steps/mail/mark.inc index eb5e416f4..4bbb65892 100644 --- a/program/steps/mail/mark.inc +++ b/program/steps/mail/mark.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/mail/mark.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2014, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Mark the submitted messages with the specified flag | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ diff --git a/program/steps/mail/move_del.inc b/program/steps/mail/move_del.inc index 9d3ac8180..2c372992e 100644 --- a/program/steps/mail/move_del.inc +++ b/program/steps/mail/move_del.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/mail/move_del.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2014, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Move the submitted messages to a specific mailbox or delete them | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ diff --git a/program/steps/mail/pagenav.inc b/program/steps/mail/pagenav.inc index 653803acb..203b136f8 100644 --- a/program/steps/mail/pagenav.inc +++ b/program/steps/mail/pagenav.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/mail/pagenav.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2016, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Updates message page navigation controls | - | | +-----------------------------------------------------------------------+ | Author: Aleksander Machniak | +-----------------------------------------------------------------------+ diff --git a/program/steps/mail/search.inc b/program/steps/mail/search.inc index b83f2d527..f60528835 100644 --- a/program/steps/mail/search.inc +++ b/program/steps/mail/search.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | steps/mail/search.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -15,7 +14,7 @@ | Mail messages search action | +-----------------------------------------------------------------------+ | Author: Benjamin Smith | - | Thomas Bruederli | + | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ */ diff --git a/program/steps/mail/search_contacts.inc b/program/steps/mail/search_contacts.inc index 597a0ea49..77bbf57ee 100644 --- a/program/steps/mail/search_contacts.inc +++ b/program/steps/mail/search_contacts.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/mail/search_contacts.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2013-2014, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Search contacts from the address book widget | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc index f85b8fcb6..94b450253 100644 --- a/program/steps/mail/sendmail.inc +++ b/program/steps/mail/sendmail.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/mail/sendmail.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2017, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/steps/mail/sendmdn.inc b/program/steps/mail/sendmdn.inc index fee21d235..2ef481967 100644 --- a/program/steps/mail/sendmdn.inc +++ b/program/steps/mail/sendmdn.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/mail/sendmdn.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2008-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Send a message disposition notification for a specific mail | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ diff --git a/program/steps/mail/show.inc b/program/steps/mail/show.inc index f9f63057d..c9cf12deb 100644 --- a/program/steps/mail/show.inc +++ b/program/steps/mail/show.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/mail/show.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Display a mail message similar as a usual mail application does | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ diff --git a/program/steps/mail/viewsource.inc b/program/steps/mail/viewsource.inc index 0a6f1f0d6..532ea073b 100644 --- a/program/steps/mail/viewsource.inc +++ b/program/steps/mail/viewsource.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/mail/viewsource.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2016, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Display a mail message similar as a usual mail application does | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ diff --git a/program/steps/settings/about.inc b/program/steps/settings/about.inc index fe23cc434..322fabb8d 100644 --- a/program/steps/settings/about.inc +++ b/program/steps/settings/about.inc @@ -2,11 +2,10 @@ /** +-----------------------------------------------------------------------+ - | program/steps/settings/about.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | - | Copyright (C) 2011-2013, Kolab Systems AG | + | | + | Copyright (C) The Roundcube Dev Team | + | Copyright (C) Kolab Systems AG | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -14,7 +13,6 @@ | | | PURPOSE: | | Display license information about program and enabled plugins | - | | +-----------------------------------------------------------------------+ | Author: Aleksander Machniak | +-----------------------------------------------------------------------+ diff --git a/program/steps/settings/edit_folder.inc b/program/steps/settings/edit_folder.inc index ba55772ca..619985741 100644 --- a/program/steps/settings/edit_folder.inc +++ b/program/steps/settings/edit_folder.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/settings/edit_folder.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Provide functionality to create/edit a folder | - | | +-----------------------------------------------------------------------+ | Author: Aleksander Machniak | +-----------------------------------------------------------------------+ diff --git a/program/steps/settings/edit_identity.inc b/program/steps/settings/edit_identity.inc index 71b7c491b..133c50ffb 100644 --- a/program/steps/settings/edit_identity.inc +++ b/program/steps/settings/edit_identity.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/settings/edit_identity.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Show edit form for a identity record or to add a new one | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ diff --git a/program/steps/settings/edit_prefs.inc b/program/steps/settings/edit_prefs.inc index 87d3133bd..1719df550 100644 --- a/program/steps/settings/edit_prefs.inc +++ b/program/steps/settings/edit_prefs.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/settings/edit_prefs.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Provide functionality for user's settings & preferences | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ diff --git a/program/steps/settings/edit_response.inc b/program/steps/settings/edit_response.inc index 7f3ac5080..71d1f2ed0 100644 --- a/program/steps/settings/edit_response.inc +++ b/program/steps/settings/edit_response.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/settings/edit_response.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Show edit form for a canned response record or to add a new one | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ diff --git a/program/steps/settings/folders.inc b/program/steps/settings/folders.inc index 8902fa28c..dd0198241 100644 --- a/program/steps/settings/folders.inc +++ b/program/steps/settings/folders.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/settings/folders.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Provide functionality of folders management | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | | Author: Aleksander Machniak | diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc index 0e5199e32..144d60c51 100644 --- a/program/steps/settings/func.inc +++ b/program/steps/settings/func.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/settings/func.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Provide functionality for user's settings & preferences | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ diff --git a/program/steps/settings/identities.inc b/program/steps/settings/identities.inc index f33c8dda8..847b87d9d 100644 --- a/program/steps/settings/identities.inc +++ b/program/steps/settings/identities.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/settings/identities.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Manage identities of a user account | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ diff --git a/program/steps/settings/responses.inc b/program/steps/settings/responses.inc index 41335f73c..52f59b308 100644 --- a/program/steps/settings/responses.inc +++ b/program/steps/settings/responses.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/settings/responses.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Manage and save canned response texts | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ diff --git a/program/steps/settings/save_folder.inc b/program/steps/settings/save_folder.inc index 3cde709e8..1b48b1258 100644 --- a/program/steps/settings/save_folder.inc +++ b/program/steps/settings/save_folder.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/settings/save_folder.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Provide functionality to create/edit a folder | - | | +-----------------------------------------------------------------------+ | Author: Aleksander Machniak | +-----------------------------------------------------------------------+ diff --git a/program/steps/settings/save_identity.inc b/program/steps/settings/save_identity.inc index 312930b12..052941ed7 100644 --- a/program/steps/settings/save_identity.inc +++ b/program/steps/settings/save_identity.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/settings/save_identity.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Save an identity record or to add a new one | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ diff --git a/program/steps/settings/save_prefs.inc b/program/steps/settings/save_prefs.inc index a6e1691d5..1fbe9d7ff 100644 --- a/program/steps/settings/save_prefs.inc +++ b/program/steps/settings/save_prefs.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/settings/save_prefs.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2017, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Save user preferences to DB and to the current session | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | | Author: Aleksander Machniak | diff --git a/program/steps/settings/upload.inc b/program/steps/settings/upload.inc index 01ee433e3..586323934 100644 --- a/program/steps/settings/upload.inc +++ b/program/steps/settings/upload.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/settings/upload.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2014, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Handles image uploads | - | | +-----------------------------------------------------------------------+ | Author: Aleksander Machniak | +-----------------------------------------------------------------------+ diff --git a/program/steps/utils/error.inc b/program/steps/utils/error.inc index af075173b..4dc4a495d 100644 --- a/program/steps/utils/error.inc +++ b/program/steps/utils/error.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/utils/error.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2015, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Display error message page | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ diff --git a/program/steps/utils/html2text.inc b/program/steps/utils/html2text.inc index 20869da12..06c0045c1 100644 --- a/program/steps/utils/html2text.inc +++ b/program/steps/utils/html2text.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/utils/html2text.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2015, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Convert HTML message to plain text | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ diff --git a/program/steps/utils/killcache.inc b/program/steps/utils/killcache.inc index ca0c687d1..881d0c5db 100644 --- a/program/steps/utils/killcache.inc +++ b/program/steps/utils/killcache.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/utils/killcache.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2010, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Delete rows from cache tables | - | | +-----------------------------------------------------------------------+ | Author: Dennis P. Nikolaenko | +-----------------------------------------------------------------------+ diff --git a/program/steps/utils/modcss.inc b/program/steps/utils/modcss.inc index 19fefe05e..f25cded3a 100644 --- a/program/steps/utils/modcss.inc +++ b/program/steps/utils/modcss.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/utils/modcss.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2007-2014, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Modify CSS source from a URL | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | | Author: Aleksander Machniak | diff --git a/program/steps/utils/save_pref.inc b/program/steps/utils/save_pref.inc index 165d86c58..7fa4562d6 100644 --- a/program/steps/utils/save_pref.inc +++ b/program/steps/utils/save_pref.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/utils/save_pref.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Save preferences setting in database | - | | +-----------------------------------------------------------------------+ | Author: Aleksander Machniak | +-----------------------------------------------------------------------+ diff --git a/program/steps/utils/spell.inc b/program/steps/utils/spell.inc index bc1448e37..698a7ab73 100644 --- a/program/steps/utils/spell.inc +++ b/program/steps/utils/spell.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/utils/spell.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2011, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Invoke the configured or default spell checking engine. | - | | +-----------------------------------------------------------------------+ | Author: Kris Steinhoff | +-----------------------------------------------------------------------+ diff --git a/program/steps/utils/spell_html.inc b/program/steps/utils/spell_html.inc index 9381956b0..d85e39cee 100644 --- a/program/steps/utils/spell_html.inc +++ b/program/steps/utils/spell_html.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/utils/spell_html.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2011, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Spellchecker for TinyMCE | - | | +-----------------------------------------------------------------------+ | Author: Aleksander Machniak | +-----------------------------------------------------------------------+ diff --git a/program/steps/utils/text2html.inc b/program/steps/utils/text2html.inc index 6b964b776..04bd573c7 100644 --- a/program/steps/utils/text2html.inc +++ b/program/steps/utils/text2html.inc @@ -2,10 +2,9 @@ /** +-----------------------------------------------------------------------+ - | program/steps/utils/text2html.inc | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2014, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -13,7 +12,6 @@ | | | PURPOSE: | | Convert plain text to HTML | - | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ diff --git a/public_html/index.php b/public_html/index.php index fda239c57..8c7cdd0a3 100644 --- a/public_html/index.php +++ b/public_html/index.php @@ -5,7 +5,7 @@ | Roundcube Webmail IMAP Client | | Version 1.4-git | | | - | Copyright (C) 2005-2017, The Roundcube Dev Team | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/skins/classic/functions.js b/skins/classic/functions.js index f5a47720b..99dd4aa25 100644 --- a/skins/classic/functions.js +++ b/skins/classic/functions.js @@ -4,7 +4,7 @@ * @licstart The following is the entire license notice for the * JavaScript code in this file. * - * Copyright (c) 2006-2014, The Roundcube Dev Team + * Copyright (c) The Roundcube Dev Team * * The JavaScript code in this page is free software: you can redistribute it * and/or modify it under the terms of the GNU General Public License @@ -22,7 +22,7 @@ function rcube_init_settings_tabs() { var el, cl, container = $('#tabsbar'), - last_tab = $('span:last', container), + last_tab = $('span', container).last(), tab = '#settingstabpreferences', action = window.rcmail && rcmail.env.action ? rcmail.env.action : null; diff --git a/skins/classic/splitter.js b/skins/classic/splitter.js index 460c35a21..848a53722 100644 --- a/skins/classic/splitter.js +++ b/skins/classic/splitter.js @@ -4,7 +4,7 @@ * @licstart The following is the entire license notice for the * JavaScript code in this file. * - * Copyright (c) 2006-2014, The Roundcube Dev Team + * Copyright (c) The Roundcube Dev Team * * The JavaScript code in this page is free software: you can redistribute it * and/or modify it under the terms of the GNU General Public License diff --git a/skins/elastic/styles/colors.less b/skins/elastic/styles/colors.less index 5a9f32e81..1b9c90096 100644 --- a/skins/elastic/styles/colors.less +++ b/skins/elastic/styles/colors.less @@ -1,7 +1,7 @@ /** - * Roundcube webmail styles for the Elastic skin + * Roundcube Webmail styles for the Elastic skin * - * Copyright (c) 2017-2018, The Roundcube Dev Team + * Copyright (c) The Roundcube Dev Team * * The contents are subject to the Creative Commons Attribution-ShareAlike * License. It is allowed to copy, distribute, transmit and to adapt the work diff --git a/skins/elastic/styles/embed.less b/skins/elastic/styles/embed.less index 58a2fff02..27a04ee54 100644 --- a/skins/elastic/styles/embed.less +++ b/skins/elastic/styles/embed.less @@ -1,7 +1,7 @@ /** - * Roundcube webmail styles for the Elastic skin + * Roundcube Webmail styles for the Elastic skin * - * Copyright (c) 2017-2018, The Roundcube Dev Team + * Copyright (c) The Roundcube Dev Team * * The contents are subject to the Creative Commons Attribution-ShareAlike * License. It is allowed to copy, distribute, transmit and to adapt the work diff --git a/skins/elastic/styles/global.less b/skins/elastic/styles/global.less index e4cfdc0d9..9e02b3ec3 100644 --- a/skins/elastic/styles/global.less +++ b/skins/elastic/styles/global.less @@ -1,7 +1,7 @@ /** - * Roundcube webmail styles for the Elastic skin + * Roundcube Webmail styles for the Elastic skin * - * Copyright (c) 2017-2018, The Roundcube Dev Team + * Copyright (c) The Roundcube Dev Team * * The contents are subject to the Creative Commons Attribution-ShareAlike * License. It is allowed to copy, distribute, transmit and to adapt the work diff --git a/skins/elastic/styles/layout.less b/skins/elastic/styles/layout.less index 90f9b4b1c..48526ab2a 100644 --- a/skins/elastic/styles/layout.less +++ b/skins/elastic/styles/layout.less @@ -1,7 +1,7 @@ /** - * Roundcube webmail styles for the Elastic skin + * Roundcube Webmail styles for the Elastic skin * - * Copyright (c) 2017-2018, The Roundcube Dev Team + * Copyright (c) The Roundcube Dev Team * * The contents are subject to the Creative Commons Attribution-ShareAlike * License. It is allowed to copy, distribute, transmit and to adapt the work diff --git a/skins/elastic/styles/mixins.less b/skins/elastic/styles/mixins.less index 0a124dd64..b4f4eed28 100644 --- a/skins/elastic/styles/mixins.less +++ b/skins/elastic/styles/mixins.less @@ -1,7 +1,7 @@ /** - * Roundcube webmail styles for the Elastic skin + * Roundcube Webmail styles for the Elastic skin * - * Copyright (c) 2017-2018, The Roundcube Dev Team + * Copyright (c) The Roundcube Dev Team * * The contents are subject to the Creative Commons Attribution-ShareAlike * License. It is allowed to copy, distribute, transmit and to adapt the work diff --git a/skins/elastic/styles/print.less b/skins/elastic/styles/print.less index 7a819a27a..3701db3e3 100644 --- a/skins/elastic/styles/print.less +++ b/skins/elastic/styles/print.less @@ -1,7 +1,7 @@ /** - * Roundcube webmail styles for the Elastic skin + * Roundcube Webmail styles for the Elastic skin * - * Copyright (c) 2017-2018, The Roundcube Dev Team + * Copyright (c) The Roundcube Dev Team * * The contents are subject to the Creative Commons Attribution-ShareAlike * License. It is allowed to copy, distribute, transmit and to adapt the work diff --git a/skins/elastic/styles/styles.less b/skins/elastic/styles/styles.less index 011e1c80f..b0b302dc8 100644 --- a/skins/elastic/styles/styles.less +++ b/skins/elastic/styles/styles.less @@ -1,7 +1,7 @@ /** - * Roundcube webmail styles for the Elastic skin + * Roundcube Webmail styles for the Elastic skin * - * Copyright (c) 2017-2018, The Roundcube Dev Team + * Copyright (c) The Roundcube Dev Team * * The contents are subject to the Creative Commons Attribution-ShareAlike * License. It is allowed to copy, distribute, transmit and to adapt the work diff --git a/skins/elastic/styles/variables.less b/skins/elastic/styles/variables.less index 73689ba96..362a925d3 100644 --- a/skins/elastic/styles/variables.less +++ b/skins/elastic/styles/variables.less @@ -1,7 +1,7 @@ /** - * Roundcube webmail styles for the Elastic skin + * Roundcube Webmail styles for the Elastic skin * - * Copyright (c) 2017-2018, The Roundcube Dev Team + * Copyright (c) The Roundcube Dev Team * * The contents are subject to the Creative Commons Attribution-ShareAlike * License. It is allowed to copy, distribute, transmit and to adapt the work diff --git a/skins/elastic/styles/widgets/buttons.less b/skins/elastic/styles/widgets/buttons.less index 320843d09..e230e877a 100644 --- a/skins/elastic/styles/widgets/buttons.less +++ b/skins/elastic/styles/widgets/buttons.less @@ -1,7 +1,7 @@ /** - * Roundcube webmail styles for the Elastic skin + * Roundcube Webmail styles for the Elastic skin * - * Copyright (c) 2017-2018, The Roundcube Dev Team + * Copyright (c) The Roundcube Dev Team * * The contents are subject to the Creative Commons Attribution-ShareAlike * License. It is allowed to copy, distribute, transmit and to adapt the work diff --git a/skins/elastic/styles/widgets/common.less b/skins/elastic/styles/widgets/common.less index 217b55f70..fd7d700a9 100644 --- a/skins/elastic/styles/widgets/common.less +++ b/skins/elastic/styles/widgets/common.less @@ -1,7 +1,7 @@ /** - * Roundcube webmail styles for the Elastic skin + * Roundcube Webmail styles for the Elastic skin * - * Copyright (c) 2017-2018, The Roundcube Dev Team + * Copyright (c) The Roundcube Dev Team * * The contents are subject to the Creative Commons Attribution-ShareAlike * License. It is allowed to copy, distribute, transmit and to adapt the work @@ -434,6 +434,7 @@ fieldset.image-attachment { table.compact-table { margin: 0; + width: 100%; *:not(.invalid-feedback) { font-size: inherit; diff --git a/skins/elastic/styles/widgets/dialogs.less b/skins/elastic/styles/widgets/dialogs.less index 3be90c7ac..a33549dcd 100644 --- a/skins/elastic/styles/widgets/dialogs.less +++ b/skins/elastic/styles/widgets/dialogs.less @@ -1,7 +1,7 @@ /** - * Roundcube webmail styles for the Elastic skin + * Roundcube Webmail styles for the Elastic skin * - * Copyright (c) 2017-2018, The Roundcube Dev Team + * Copyright (c) The Roundcube Dev Team * * The contents are subject to the Creative Commons Attribution-ShareAlike * License. It is allowed to copy, distribute, transmit and to adapt the work diff --git a/skins/elastic/styles/widgets/editor.less b/skins/elastic/styles/widgets/editor.less index ac257ced7..246f22870 100644 --- a/skins/elastic/styles/widgets/editor.less +++ b/skins/elastic/styles/widgets/editor.less @@ -1,7 +1,7 @@ /** - * Roundcube webmail styles for the Elastic skin + * Roundcube Webmail styles for the Elastic skin * - * Copyright (c) 2017-2018, The Roundcube Dev Team + * Copyright (c) The Roundcube Dev Team * * The contents are subject to the Creative Commons Attribution-ShareAlike * License. It is allowed to copy, distribute, transmit and to adapt the work diff --git a/skins/elastic/styles/widgets/forms.less b/skins/elastic/styles/widgets/forms.less index ee8860771..5d8fd77b7 100644 --- a/skins/elastic/styles/widgets/forms.less +++ b/skins/elastic/styles/widgets/forms.less @@ -1,7 +1,7 @@ /** - * Roundcube webmail styles for the Elastic skin + * Roundcube Webmail styles for the Elastic skin * - * Copyright (c) 2017-2018, The Roundcube Dev Team + * Copyright (c) The Roundcube Dev Team * * The contents are subject to the Creative Commons Attribution-ShareAlike * License. It is allowed to copy, distribute, transmit and to adapt the work @@ -55,6 +55,7 @@ input.smart-upload { td.rowbuttons { width: 1%; white-space: nowrap; + vertical-align: top; span { display: none; @@ -92,6 +93,7 @@ input.smart-upload { td.rowactions { width: 1%; + vertical-align: top; .form-control { width: auto; @@ -99,6 +101,8 @@ input.smart-upload { } td.rowtargets { + vertical-align: top; + .composite { input, textarea, select, .multi-input, .input-group { margin-bottom: .5rem; @@ -312,12 +316,6 @@ input.smart-upload { @media screen and (max-width: @screen-width-bs-phone) { .propform { table.compact-table { - overflow-x: initial; - - tbody { - display: block; - } - .rowactions > select, .flexbox > select { width: 100%; @@ -329,8 +327,7 @@ input.smart-upload { td { width: 100%; - padding-right: 0; - padding-left: 0; + padding: .25rem 0 0 0; &.rowbuttons { text-align: right; diff --git a/skins/elastic/styles/widgets/jqueryui.less b/skins/elastic/styles/widgets/jqueryui.less index 2698c82b8..cc0133900 100644 --- a/skins/elastic/styles/widgets/jqueryui.less +++ b/skins/elastic/styles/widgets/jqueryui.less @@ -1,7 +1,7 @@ /** - * Roundcube webmail styles for the Elastic skin + * Roundcube Webmail styles for the Elastic skin * - * Copyright (c) 2017-2018, The Roundcube Dev Team + * Copyright (c) The Roundcube Dev Team * * The contents are subject to the Creative Commons Attribution-ShareAlike * License. It is allowed to copy, distribute, transmit and to adapt the work diff --git a/skins/elastic/styles/widgets/lists.less b/skins/elastic/styles/widgets/lists.less index a2165761b..ecd9691e4 100644 --- a/skins/elastic/styles/widgets/lists.less +++ b/skins/elastic/styles/widgets/lists.less @@ -1,7 +1,7 @@ /** - * Roundcube webmail styles for the Elastic skin + * Roundcube Webmail styles for the Elastic skin * - * Copyright (c) 2017-2018, The Roundcube Dev Team + * Copyright (c) The Roundcube Dev Team * * The contents are subject to the Creative Commons Attribution-ShareAlike * License. It is allowed to copy, distribute, transmit and to adapt the work diff --git a/skins/elastic/styles/widgets/mail.less b/skins/elastic/styles/widgets/mail.less index 7bafda318..11b46a1e3 100644 --- a/skins/elastic/styles/widgets/mail.less +++ b/skins/elastic/styles/widgets/mail.less @@ -1,7 +1,7 @@ /** - * Roundcube webmail styles for the Elastic skin + * Roundcube Webmail styles for the Elastic skin * - * Copyright (c) 2017-2018, The Roundcube Dev Team + * Copyright (c) The Roundcube Dev Team * * The contents are subject to the Creative Commons Attribution-ShareAlike * License. It is allowed to copy, distribute, transmit and to adapt the work diff --git a/skins/elastic/styles/widgets/menu.less b/skins/elastic/styles/widgets/menu.less index 27595646d..ba1160953 100644 --- a/skins/elastic/styles/widgets/menu.less +++ b/skins/elastic/styles/widgets/menu.less @@ -1,7 +1,7 @@ /** - * Roundcube webmail styles for the Elastic skin + * Roundcube Webmail styles for the Elastic skin * - * Copyright (c) 2017-2018, The Roundcube Dev Team + * Copyright (c) The Roundcube Dev Team * * The contents are subject to the Creative Commons Attribution-ShareAlike * License. It is allowed to copy, distribute, transmit and to adapt the work diff --git a/skins/elastic/styles/widgets/messages.less b/skins/elastic/styles/widgets/messages.less index 6f28ed321..1b2f48f73 100644 --- a/skins/elastic/styles/widgets/messages.less +++ b/skins/elastic/styles/widgets/messages.less @@ -1,7 +1,7 @@ /** - * Roundcube webmail styles for the Elastic skin + * Roundcube Webmail styles for the Elastic skin * - * Copyright (c) 2017-2018, The Roundcube Dev Team + * Copyright (c) The Roundcube Dev Team * * The contents are subject to the Creative Commons Attribution-ShareAlike * License. It is allowed to copy, distribute, transmit and to adapt the work diff --git a/skins/elastic/ui.js b/skins/elastic/ui.js index c44ee79fb..2f281593f 100644 --- a/skins/elastic/ui.js +++ b/skins/elastic/ui.js @@ -1,7 +1,7 @@ /** * Roundcube webmail functions for the Elastic skin * - * Copyright (c) 2017-2018, The Roundcube Dev Team + * Copyright (c) The Roundcube Dev Team * * The contents are subject to the Creative Commons Attribution-ShareAlike * License. It is allowed to copy, distribute, transmit and to adapt the work @@ -19,6 +19,7 @@ function rcube_elastic_ui() mode = 'normal', // one of: large, normal, small, phone touch = false, ios = false, + popups_close_lock, is_framed = rcmail.is_framed(), env = { config: { @@ -146,15 +147,15 @@ function rcube_elastic_ui() // Set content frame title in parent window (exclude ext-windows and dialog frames) if (is_framed && !rcmail.env.extwin && !parent.$('.ui-dialog:visible').length) { - if (title = $('h1.voice:first').text()) { + if (title = $('h1.voice').first().text()) { parent.$('#layout-content > .header > .header-title:not(.constant)').text(title); } } else if (!is_framed) { - title = $('.boxtitle:first', layout.content).detach().text(); + title = $('.boxtitle', layout.content).first().detach().text(); if (!title) { - title = $('h1.voice:first').text(); + title = $('h1.voice').first().text(); } if (title) { @@ -498,7 +499,7 @@ function rcube_elastic_ui() function init() { // Additional functionality on list widgets - $('table[data-list]').each(function() { + $('[data-list]').filter('ul,table').each(function() { var button, table = $(this), list = table.data('list'); @@ -859,7 +860,7 @@ function rcube_elastic_ui() // Special input + anything entry $('td.input-group', context).each(function() { - $(this).children(':not(:first)').addClass('input-group-append'); + $(this).children().slice(1).addClass('input-group-append'); }); // Other forms, e.g. Contact advanced search @@ -944,7 +945,7 @@ function rcube_elastic_ui() tab = $('
  • ').addClass('nav-item').append( $('').addClass('nav-link' + (tab_class ? ' ' + tab_class : '')) .attr({role: 'tab', 'href': '#' + id}) - .text($('legend:first', fieldset).text()) + .text($('legend', fieldset).first().text()) .click(function(e) { $(this).tab('show'); // Because we return false we have to close popups @@ -955,14 +956,14 @@ function rcube_elastic_ui() }) ); - $('legend:first', fieldset).hide(); + $('legend', fieldset).first().hide(); tabs.push(tab); }); // create the navigation bar nav.append(tabs).insertBefore(item); // activate the first tab - $('a.nav-link:first', nav).click(); + $('a.nav-link', nav).first().click(); }); $('input[type=file]:not(.custom-file-input)', context).each(function() { @@ -987,7 +988,7 @@ function rcube_elastic_ui() }); // Make tables pretier - $('table:not(.table,.propform,.listing,.ui-datepicker-calendar)', context) + $('table:not(.table,.compact-table,.propform,.listing,.ui-datepicker-calendar)', context) .filter(function() { // exclude direct propform children and external content return !$(this).parent().is('.propform') @@ -1013,7 +1014,7 @@ function rcube_elastic_ui() // Input-group combo is an element with a select field on the left // and input(s) on right, and where the whole right side can be hidden // depending on the select position. This code fixes border radius on select - $('.input-group-combo > select:first', context).on('change', function() { + $('.input-group-combo > select', context).first().on('change', function() { var select = $(this), fn = function() { select[select.next().is(':visible') ? 'removeClass' : 'addClass']('alone'); @@ -2296,7 +2297,7 @@ function rcube_elastic_ui() } }); - popover.find('a.active:first').focus(); + popover.find('a.active').first().focus(); } if (popup_id && menus[popup_id]) { @@ -2384,6 +2385,11 @@ function rcube_elastic_ui() */ function popups_close(e) { + // Ignore some of propagated click events (see pretty_select()) + if (popups_close_lock && popups_close_lock > (new Date().getTime() - 250)) { + return; + } + $('.popover.show').each(function() { var popup = $('.popover-body', this), button = popup.children().first().data('button'); @@ -2419,7 +2425,7 @@ function rcube_elastic_ui() } else if (p.event == 'menu-open') { var fn, pos, - content = $('ul:first', p.obj), + content = $('ul', p.obj).first(), target = p.props && p.props.link ? p.props.link : p.originalEvent.target; if ($(target).is('span')) { @@ -2995,7 +3001,7 @@ function rcube_elastic_ui() }, open: function() { // Don't want focus in the search field, we focus first contacts source record instead - $('#directorylist a:first').focus(); + $('#directorylist a').first().focus(); }, close: function() { dialog.appendTo(parent); @@ -3126,7 +3132,7 @@ function rcube_elastic_ui() keydown_func = function(e) { // On Backspace remove the last recipient if (e.keyCode == 8 && !input.val().length) { - list.children('li.recipient:last').remove(); + list.children('li.recipient').first().remove(); apply_func(); return false; } @@ -3415,15 +3421,18 @@ function rcube_elastic_ui() var open_func = function(e) { var items = [], dialog = select.closest('.ui-dialog')[0], - min_width = select.outerWidth(), max_height = $(document.body).height() - 75, max_width = $(document.body).width() - 20, + min_width = Math.min(select.outerWidth(), max_width), value = select.val(); if (!is_mobile()) { max_height *= 0.5; } + // close other popups + popups_close(e); + $('option', select).each(function() { var label = $(this).text(), link = $('') @@ -3442,6 +3451,7 @@ function rcube_elastic_ui() var list = $('
      ') .attr('data-ident', select_ident) + .data('button', select[0]) .append(items) .on('click', 'a.active', function() { // first close the list, then update the select, the order is important @@ -3496,6 +3506,7 @@ function rcube_elastic_ui() + '
      ' }) .on('shown.bs.popover', function() { + select.focus(); // for Chrome // Set popup Close title list.parent().prev() .empty() @@ -3508,7 +3519,7 @@ function rcube_elastic_ui() // focus first active element on the list if (rcube_event.is_keyboard(e)) { - list.find('a.active:first').focus(); + list.find('a.active').first().focus(); } // don't propagate mousedown event @@ -3546,15 +3557,15 @@ function rcube_elastic_ui() // display options in our way (on SPACE, ENTER, ARROW-DOWN or mousedown) if (e.type == 'mousedown' || e.which == 13 || e.which == 32 || e.which == 40 || e.which == 63233) { open_func(e); + + // Prevent from closing the menu by general popover closing handler (popups_close()) + // We used to just stop propagation in onclick handler, but it didn't work + // in Chrome where onclick handler wasn't invoked on mobile (#6705) + popups_close_lock = new Date().getTime(); + return false; } }) - .on('click', function(e) { - // Stop propagation of click event to prevent from - // disposing the menu by general popover closing handler (popups_close()) - e.stopPropagation(); - return false; - }); }; /** diff --git a/skins/larry/addressbook.css b/skins/larry/addressbook.css index 3331e5b6b..9e2d3223a 100644 --- a/skins/larry/addressbook.css +++ b/skins/larry/addressbook.css @@ -1,8 +1,8 @@ /** * Roundcube webmail styles for the Address Book section * - * Copyright (c) 2012-2017, The Roundcube Dev Team - * Screendesign by FLINT / B�ro f�r Gestaltung, bueroflint.com + * Copyright (c) The Roundcube Dev Team + * Screendesign by FLINT / Büro für Gestaltung, bueroflint.com * * The contents are subject to the Creative Commons Attribution-ShareAlike * License. It is allowed to copy, distribute, transmit and to adapt the work diff --git a/skins/larry/embed.css b/skins/larry/embed.css index 53d02a94a..031e20160 100644 --- a/skins/larry/embed.css +++ b/skins/larry/embed.css @@ -1,7 +1,7 @@ /** * Roundcube webmail "embedded" stylesheets * - * Copyright (c) 2012, The Roundcube Dev Team + * Copyright (c) The Roundcube Dev Team * * The contents are subject to the Creative Commons Attribution-ShareAlike * License. It is allowed to copy, distribute, transmit and to adapt the work diff --git a/skins/larry/mail.css b/skins/larry/mail.css index 1f75edec8..3673c868d 100644 --- a/skins/larry/mail.css +++ b/skins/larry/mail.css @@ -1,7 +1,7 @@ /** * Roundcube webmail styles for the Email section * - * Copyright (c) 2012-2017, The Roundcube Dev Team + * Copyright (c) The Roundcube Dev Team * Screendesign by FLINT / Büro für Gestaltung, bueroflint.com * * The contents are subject to the Creative Commons Attribution-ShareAlike diff --git a/skins/larry/print.css b/skins/larry/print.css index bb2722a53..9ed746664 100644 --- a/skins/larry/print.css +++ b/skins/larry/print.css @@ -1,7 +1,7 @@ /** * Roundcube webmail styles for message printing * - * Copyright (c) 2012, The Roundcube Dev Team + * Copyright (c) The Roundcube Dev Team * * The contents are subject to the Creative Commons Attribution-ShareAlike * License. It is allowed to copy, distribute, transmit and to adapt the work diff --git a/skins/larry/settings.css b/skins/larry/settings.css index 24faeccba..4a290fd12 100644 --- a/skins/larry/settings.css +++ b/skins/larry/settings.css @@ -1,7 +1,7 @@ /** * Roundcube webmail styles for the Settings section * - * Copyright (c) 2017-2017, The Roundcube Dev Team + * Copyright (c) The Roundcube Dev Team * Screendesign by FLINT / Büro für Gestaltung, bueroflint.com * * The contents are subject to the Creative Commons Attribution-ShareAlike diff --git a/skins/larry/styles.css b/skins/larry/styles.css index 20ac1b33d..336be639c 100644 --- a/skins/larry/styles.css +++ b/skins/larry/styles.css @@ -1,7 +1,7 @@ /** * Roundcube webmail styles for skin "Larry" * - * Copyright (c) 2012-2017, The Roundcube Dev Team + * Copyright (c) The Roundcube Dev Team * Screendesign by FLINT / Büro für Gestaltung, bueroflint.com * * The contents are subject to the Creative Commons Attribution-ShareAlike diff --git a/skins/larry/ui.js b/skins/larry/ui.js index 917d66525..270aeb051 100644 --- a/skins/larry/ui.js +++ b/skins/larry/ui.js @@ -1,7 +1,7 @@ /** * Roundcube functions for default skin interface * - * Copyright (c) 2013, The Roundcube Dev Team + * Copyright (c) The Roundcube Dev Team * * The contents are subject to the Creative Commons Attribution-ShareAlike * License. It is allowed to copy, distribute, transmit and to adapt the work diff --git a/tests/Framework/Washtml.php b/tests/Framework/Washtml.php index eebd80de5..1e66c809e 100644 --- a/tests/Framework/Washtml.php +++ b/tests/Framework/Washtml.php @@ -430,4 +430,46 @@ class Framework_Washtml extends PHPUnit_Framework_TestCase $this->assertContains('for="testmy-other-id"', $washed); $this->assertContains('class="testmy-class1 testmy-class2"', $washed); } + + /** + * Test removing xml:namespace tag + */ + function test_xml_namespace() + { + $html = '

      '; + + $washer = new rcube_washtml; + $washed = $this->cleanupResult($washer->wash($html)); + + $this->assertNotContains('<?xml:namespace"', $washed); + $this->assertSame($washed, '

      '); + } + + /** + * Test missing main HTML hierarchy tags (#6713) + */ + function test_missing_tags() + { + $washer = new rcube_washtml(); + + $html = 'First line
      Second line'; + $washed = $washer->wash($html); + + $this->assertContains('First line', $washed); + + $html = 'First line
      Second line'; + $washed = $washer->wash($html); + + $this->assertContains('First line', $washed); + + $html = 'First line
      Second line'; + $washed = $washer->wash($html); + + $this->assertContains('>First line', $washed); + + $html = 'First line
      Second line'; + $washed = $washer->wash($html); + + $this->assertContains('First line', $washed); + } } diff --git a/tests/MailFunc.php b/tests/MailFunc.php index fb4749196..0fbea9e0f 100644 --- a/tests/MailFunc.php +++ b/tests/MailFunc.php @@ -123,6 +123,38 @@ class MailFunc extends PHPUnit_Framework_TestCase $this->assertRegExp('/

      (символ|симол)<\/p>/', $washed, "Remove non-unicode characters from HTML message body"); } + /** + * Test inserting meta tag with required charset definition + */ + function test_meta_insertion() + { + $meta = ''; + $args = array( + 'html_elements' => array('html', 'body', 'meta', 'head'), + 'html_attribs' => array('charset'), + ); + + $body = 'Test1
      Test2'; + $washed = rcmail_wash_html($body, $args); + $this->assertContains("$metaTest1", $washed, "Meta tag insertion (1)"); + + $body = 'Test1
      Test2'; + $washed = rcmail_wash_html($body, $args); + $this->assertContains("$metaTest1", $washed, "Meta tag insertion (2)"); + + $body = 'Test1
      Test2'; + $washed = rcmail_wash_html($body, $args); + $this->assertTrue(strpos($washed, "$meta") === 0, "Meta tag insertion (3)"); + + $body = 'Test1
      Test2'; + $washed = rcmail_wash_html($body, $args); + $this->assertTrue(strpos($washed, "$meta") === 0, "Meta tag insertion (4)"); + + $body = 'Test1
      Test2'; + $washed = rcmail_wash_html($body, $args); + $this->assertTrue(strpos($washed, "$meta") === 0, "Meta tag insertion (5)"); + } + /** * Test links pattern replacements in plaintext messages */ diff --git a/tests/Selenium/bootstrap.php b/tests/Selenium/bootstrap.php index 9baf0c09c..47e53757f 100644 --- a/tests/Selenium/bootstrap.php +++ b/tests/Selenium/bootstrap.php @@ -2,10 +2,9 @@ /* +-----------------------------------------------------------------------+ - | tests/Selenium/bootstrap.php | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2009-2014, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 925cca66a..9e5a0e0e4 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -2,10 +2,9 @@ /* +-----------------------------------------------------------------------+ - | tests/bootstrap.php | - | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2009-2012, The Roundcube Dev Team | + | | + | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. |