diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c5e02ef585e..e84fa11d938 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -41,7 +41,7 @@ jobs: - name: Setup composer run: | cp composer.json-dist composer.json - composer require "kolab/net_ldap3:~1.1.1" --no-update + composer require "kolab/net_ldap3:~1.1.4" --no-update - name: Install dependencies run: composer install --prefer-dist --no-interaction --no-progress @@ -86,7 +86,7 @@ jobs: - name: Setup composer run: | cp composer.json-dist composer.json - composer require "kolab/net_ldap3:~1.1.1" --no-update + composer require "kolab/net_ldap3:~1.1.4" --no-update - name: Install dependencies run: composer install --prefer-dist --no-interaction --no-progress diff --git a/CHANGELOG.md b/CHANGELOG.md index 11cbb5fdf8b..ed764d40c70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,8 @@ - Fix PHP8 warnings (#9235, #9238, #9242) - Fix saving other encryption settings besides enigma's (#9240) - Fix unneeded php command use in installto.sh and deluser.sh scripts (#9237) +- Fix TinyMCE localization installation (#9266) +- Fix bug where trailing non-ascii characters in email addresses could have been removed in recipient input (#9257) ## Release 1.6.5 diff --git a/Makefile b/Makefile index 861d590e883..b9658552ea7 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ complete: roundcubemail-git cp -RH roundcubemail-git roundcubemail-$(VERSION) (cd roundcubemail-$(VERSION); cp composer.json-dist composer.json) (cd roundcubemail-$(VERSION); php /tmp/composer.phar config platform.php $(PHP_VERSION)) - (cd roundcubemail-$(VERSION); php /tmp/composer.phar require "kolab/net_ldap3:~1.1.1" --no-update --no-install) + (cd roundcubemail-$(VERSION); php /tmp/composer.phar require "kolab/net_ldap3:~1.1.4" --no-update --no-install) (cd roundcubemail-$(VERSION); php /tmp/composer.phar config --unset suggest.kolab/net_ldap3) (cd roundcubemail-$(VERSION); php /tmp/composer.phar config --unset require-dev) (cd roundcubemail-$(VERSION); php /tmp/composer.phar install --prefer-dist --no-dev --no-interaction) diff --git a/bin/install-jsdeps.sh b/bin/install-jsdeps.sh index 59227df434e..0dff073368e 100755 --- a/bin/install-jsdeps.sh +++ b/bin/install-jsdeps.sh @@ -158,7 +158,7 @@ function extract_filetype($package, &$filetype = null) { global $CACHEDIR; - $filetype = pathinfo($package['url'], PATHINFO_EXTENSION) ?: 'tmp'; + $filetype = pathinfo(preg_replace('/[?&].*$/', '', $package['url']), PATHINFO_EXTENSION) ?: 'tmp'; $cache_file = $CACHEDIR . '/' . $package['lib'] . '-' . $package['version'] . '.' . $filetype; // Make sure it is a zip file diff --git a/composer.json-dist b/composer.json-dist index 9a400de77fd..aa23b690180 100644 --- a/composer.json-dist +++ b/composer.json-dist @@ -23,7 +23,7 @@ }, "suggest": { "bjeavons/zxcvbn-php": "^1.0 required for Zxcvbn password strength driver", - "kolab/net_ldap3": "~1.1.1 required for connecting to LDAP" + "kolab/net_ldap3": "~1.1.4 required for connecting to LDAP" }, "repositories": [ { diff --git a/jsdeps.json b/jsdeps.json index 0a775bfdc35..c40d91fe5c1 100644 --- a/jsdeps.json +++ b/jsdeps.json @@ -45,7 +45,7 @@ { "lib": "tinymce-langs", "version": "5.10.9", - "url": "https://www.tiny.cloud/tinymce-services-azure/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&v=$v&extension=.zip", + "url": "https://download.tiny.cloud/tinymce/community/languagepacks/5/langs.zip?v=$v", "dest": "program/js/tinymce" }, { diff --git a/program/lib/Roundcube/rcube.php b/program/lib/Roundcube/rcube.php index d833098d512..c616610c71d 100644 --- a/program/lib/Roundcube/rcube.php +++ b/program/lib/Roundcube/rcube.php @@ -965,7 +965,7 @@ public function decrypt($cipher, $key = 'des_key', $base64 = true) $iv_size = openssl_cipher_iv_length($method); $tag = null; - if (preg_match('/^##(.{16})##/', $cipher, $matches)) { + if (preg_match('/^##(.{16})##/s', $cipher, $matches)) { $tag = $matches[1]; $cipher = substr($cipher, strlen($matches[0])); } diff --git a/program/lib/Roundcube/rcube_imap.php b/program/lib/Roundcube/rcube_imap.php index 45616b611ac..ad9c768a8e8 100644 --- a/program/lib/Roundcube/rcube_imap.php +++ b/program/lib/Roundcube/rcube_imap.php @@ -141,7 +141,7 @@ public function connect($host, $user, $pass, $port = 143, $use_ssl = null) 'version' => RCUBE_VERSION, 'php' => PHP_VERSION, 'os' => PHP_OS, - 'command' => $_SERVER['REQUEST_URI'], + 'command' => $_SERVER['REQUEST_URI'] ?? '', ]; } diff --git a/skins/elastic/README.md b/skins/elastic/README.md index 8c663cd6a04..dae4b5a33c7 100644 --- a/skins/elastic/README.md +++ b/skins/elastic/README.md @@ -48,8 +48,7 @@ or after installing it on the destination system. FOR DEVELOPERS -------------- -- Supported browsers: IE11+, Edge, Last 2 versions for Chrome/Firefox/Safari, - Android Browser 5+, iOS Safari 9+. +- Supported browsers: Last 2 versions of Edge/Chrome/Firefox/Safari. - Skin color palette changes and other css modifications can be done via _styles.less and _variables.less files. Where you can overwrite all diff --git a/skins/elastic/ui.js b/skins/elastic/ui.js index 0b0bc5c6bf6..633256e240a 100644 --- a/skins/elastic/ui.js +++ b/skins/elastic/ui.js @@ -3497,7 +3497,7 @@ function rcube_elastic_ui() recipients.push({ name: '', email: email.replace(/(^<|>$)/g, '') // trim < and > characters - .replace(/[^a-z]$/gi, '') // remove trailing comma or any non-letter character at the end (#7899) + .replace(/[^\p{L}]$/giu, '') // remove trailing comma or any non-letter character at the end (#7899, #9257) }); str = str.replace(email, '').trim(); diff --git a/tests/Framework/Rcube.php b/tests/Framework/Rcube.php index 8bce3d744a5..5b3f974be21 100644 --- a/tests/Framework/Rcube.php +++ b/tests/Framework/Rcube.php @@ -45,22 +45,19 @@ function test_list_languages() function test_encrypt_and_decrypt() { $rcube = rcube::get_instance(); - $result = $rcube->decrypt($rcube->encrypt('test')); + $result = $rcube->decrypt($rcube->encrypt('test')); $this->assertSame('test', $result); - // The following tests fail quite often, therefore we disable them - $this->markTestSkipped(); - // Test AEAD cipher method + $defaultCipherMethod = $rcube->config->get('cipher_method'); $rcube->config->set('cipher_method', 'aes-256-gcm'); - - $result = $rcube->decrypt($rcube->encrypt('test')); - - $this->assertSame('test', $result); - - // Back to the default - $rcube->config->set('cipher_method', 'DES-EDE3-CBC'); + try { + $result = $rcube->decrypt($rcube->encrypt('test')); + $this->assertSame('test', $result); + } finally { + $rcube->config->set('cipher_method', $defaultCipherMethod); + } } /**