Projects
Kolab:Winterfell
roundcubemail
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 95
View file
roundcubemail.spec
Changed
@@ -49,7 +49,7 @@ Name: roundcubemail Version: 1.3.4 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Round Cube Webmail is a browser-based multilingual IMAP client @@ -69,6 +69,7 @@ Source200: 2017111400.sql Patch201: default-configuration.patch +Patch202: enigma-multihost.patch Patch0001: 0001-Validate-ACL-identifiers.patch Patch0002: 0002-Fix-PHP-7.2-warning-count-Parameter-must-be-an-array.patch @@ -81,6 +82,8 @@ Patch0010: 0010-Change-wording.patch Patch0011: 0011-Remove-redundant-trim.patch Patch0012: 0012-Update-composer-reference-to-endroid-qr-code-6132.patch +Patch0013: 0013-Added-9pt-and-11pt-to-the-list-of-font-sizes-in-HTML.patch +Patch0014: 0014-Fix-handling-encoding-of-HTML-tags-in-inline-JSON-ou.patch BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root%(%{__id_u} -n) @@ -1091,6 +1094,9 @@ %patch0010 -p1 %patch0011 -p1 %patch0012 -p1 +%patch0013 -p1 +%patch0014 -p1 +%patch202 -p1 # Remove the results of patching when there's an incidental offset find . -type f -name "*.orig" -delete @@ -2878,6 +2884,9 @@ %defattr(-,root,root,-) %changelog +* Thu Mar 8 2018 Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> - 1.3.4-3 +- Check in 14 revisions ahead of 1.3.4 release + * Wed Feb 28 2018 Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> - 1.3.4-2 - Check in 12 revisions ahead of 1.3.4 release
View file
0013-Added-9pt-and-11pt-to-the-list-of-font-sizes-in-HTML.patch
Added
@@ -0,0 +1,52 @@ +From 8565b51059d38df76d86ae93e7ea01a26988d4c0 Mon Sep 17 00:00:00 2001 +From: Aleksander Machniak <alec@alec.pl> +Date: Tue, 6 Mar 2018 09:17:51 +0100 +Subject: [PATCH 13/14] Added 9pt and 11pt to the list of font sizes in HTML + editor + +--- + CHANGELOG | 1 + + program/js/editor.js | 1 + + program/steps/settings/func.inc | 2 +- + 3 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/CHANGELOG b/CHANGELOG +index aac6d58b8..797898197 100644 +--- a/CHANGELOG ++++ b/CHANGELOG +@@ -7,6 +7,7 @@ CHANGELOG Roundcube Webmail + - Fix PHP Warning: exif_read_data(...): Illegal IFD size (#6169) + - Enigma: Fix key generation in Safari by upgrade to OpenPGP 2.6.2 (#6149) + - Fix security issue in remote content blocking on HTML image and style tags (#6178) ++- Added 9pt and 11pt to the list of font sizes in HTML editor + + RELEASE 1.3.4 + ------------- +diff --git a/program/js/editor.js b/program/js/editor.js +index 19b1be339..9460c4a1c 100644 +--- a/program/js/editor.js ++++ b/program/js/editor.js +@@ -47,6 +47,7 @@ function rcube_text_editor(config, id) + statusbar: false, + toolbar_items_size: 'small', + extended_valid_elements: 'font[face|size|color|style],span[id|class|align|style]', ++ fontsize_formats: '8pt 9pt 10pt 11pt 12pt 14pt 18pt 24pt 36pt', + relative_urls: false, + remove_script_host: false, + convert_urls: false, // #1486944 +diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc +index aa5413c47..b5d8c2824 100644 +--- a/program/steps/settings/func.inc ++++ b/program/steps/settings/func.inc +@@ -917,7 +917,7 @@ function rcmail_user_prefs($current = null) + $field_id = 'rcmfd_default_font_size'; + $select_default_font_size = new html_select(array('name' => '_default_font_size', 'id' => $field_id)); + +- $fontsizes = array('', '8pt', '10pt', '12pt', '14pt', '18pt', '24pt', '36pt'); ++ $fontsizes = array('', '8pt', '9pt', '10pt', '11pt', '12pt', '14pt', '18pt', '24pt', '36pt'); + foreach ($fontsizes as $size) { + $select_default_font_size->add($size, $size); + } +-- +2.14.3 +
View file
0014-Fix-handling-encoding-of-HTML-tags-in-inline-JSON-ou.patch
Added
@@ -0,0 +1,77 @@ +From e5b7bcd20792021a8fe18718fae7de18263fff01 Mon Sep 17 00:00:00 2001 +From: Aleksander Machniak <alec@alec.pl> +Date: Wed, 7 Mar 2018 17:40:12 +0100 +Subject: [PATCH 14/14] Fix handling encoding of HTML tags in "inline" JSON + output (#6207) + +--- + CHANGELOG | 1 + + program/include/rcmail_output_json.php | 4 ++-- + program/lib/Roundcube/rcube_output.php | 10 +++++++++- + 3 files changed, 12 insertions(+), 3 deletions(-) + +diff --git a/CHANGELOG b/CHANGELOG +index 797898197..9a8fc6d01 100644 +--- a/CHANGELOG ++++ b/CHANGELOG +@@ -8,6 +8,7 @@ CHANGELOG Roundcube Webmail + - Enigma: Fix key generation in Safari by upgrade to OpenPGP 2.6.2 (#6149) + - Fix security issue in remote content blocking on HTML image and style tags (#6178) + - Added 9pt and 11pt to the list of font sizes in HTML editor ++- Fix handling encoding of HTML tags in "inline" JSON output (#6207) + + RELEASE 1.3.4 + ------------- +diff --git a/program/include/rcmail_output_json.php b/program/include/rcmail_output_json.php +index 5b559e2cd..3a4e76f50 100644 +--- a/program/include/rcmail_output_json.php ++++ b/program/include/rcmail_output_json.php +@@ -232,7 +232,7 @@ class rcmail_output_json extends rcmail_output + $response = $hook['response']; + unset($hook['response']); + +- echo self::json_serialize($response, $this->devel_mode); ++ echo self::json_serialize($response, $this->devel_mode, false); + } + + /** +@@ -245,7 +245,7 @@ class rcmail_output_json extends rcmail_output + foreach ($this->commands as $i => $args) { + $method = array_shift($args); + foreach ($args as $i => $arg) { +- $args[$i] = self::json_serialize($arg, $this->devel_mode); ++ $args[$i] = self::json_serialize($arg, $this->devel_mode, false); + } + + $out .= sprintf( +diff --git a/program/lib/Roundcube/rcube_output.php b/program/lib/Roundcube/rcube_output.php +index 905f8434e..dd9c0fb8e 100644 +--- a/program/lib/Roundcube/rcube_output.php ++++ b/program/lib/Roundcube/rcube_output.php +@@ -267,14 +267,22 @@ abstract class rcube_output + * + * @param mixed $input Input value + * @param boolean $pretty Enable JSON formatting ++ * @param boolean $inline Enable inline mode (generates output safe for use inside HTML) + * + * @return string Serialized JSON string + */ +- public static function json_serialize($input, $pretty = false) ++ public static function json_serialize($input, $pretty = false, $inline = true) + { ++ // The input need to be valid UTF-8 to use with json_encode() + $input = rcube_charset::clean($input); + $options = 0; + ++ // JSON_HEX_TAG is needed for inlining JSON inside of the <script> tag ++ // if input contains a html tag it will cause issues (#6207) ++ if ($inline) { ++ $options |= JSON_HEX_TAG; ++ } ++ + if ($pretty) { + $options |= JSON_PRETTY_PRINT; + } +-- +2.14.3 +
View file
enigma-multihost.patch
Added
@@ -0,0 +1,254 @@ +diff --git a/plugins/enigma/README b/plugins/enigma/README +index e2b3c824c..880015eaf 100644 +--- a/plugins/enigma/README ++++ b/plugins/enigma/README +@@ -8,6 +8,8 @@ The plugin uses gpg binary on the server and stores all keys + Encryption/decryption is done server-side. So, this plugin + is for users that trust the server. + ++For multi-host environments see enigma_multihost setting description. ++ + + Implemented features: + --------------------- +@@ -36,7 +38,6 @@ TODO: + - Search filter to see invalid/expired keys + - Key server(s) support (upload, refresh) + - Mark keys as trusted/untrasted, display appropriate message in verify/decrypt status +-- Support for multi-server installations (store keys in sql database? probably impossible with GnuPG 2.1) + - Performance improvements: + - cache decrypted message key id so we can skip decryption if we have no password in session + - cache (last or successful only?) sig verification status to not verify on every msg preview (optional) +diff --git a/plugins/enigma/config.inc.php.dist b/plugins/enigma/config.inc.php.dist +index aa4280f41..82ba4881f 100644 +--- a/plugins/enigma/config.inc.php.dist ++++ b/plugins/enigma/config.inc.php.dist +@@ -28,6 +28,13 @@ $config['enigma_pgp_agent'] = ''; + // It's used with GnuPG >= 2.1. + $config['enigma_pgp_gpgconf'] = ''; + ++// Enables multi-host environments support. ++// Enable it if you have more than one HTTP server. ++// Make sure all servers run the same GnuPG version and have time in sync. ++// Keys will be stored in SQL database (make sure max_allowed_packet ++// is big enough). ++$config['enigma_multihost'] = false; ++ + // Enables signatures verification feature. + $config['enigma_signatures'] = true; + +diff --git a/plugins/enigma/lib/enigma_driver_gnupg.php b/plugins/enigma/lib/enigma_driver_gnupg.php +index a8d84ebea..88112a2e5 100644 +--- a/plugins/enigma/lib/enigma_driver_gnupg.php ++++ b/plugins/enigma/lib/enigma_driver_gnupg.php +@@ -24,6 +24,8 @@ class enigma_driver_gnupg extends enigma_driver + protected $homedir; + protected $user; + protected $last_sig_algorithm; ++ protected $debug = false; ++ protected $db_files = array('pubring.gpg', 'secring.gpg'); + + + function __construct($user) +@@ -77,6 +79,7 @@ class enigma_driver_gnupg extends enigma_driver + "Unable to write to keys directory: $homedir"); + } + ++ $this->debug = $debug; + $this->homedir = $homedir; + + $options = array('homedir' => $this->homedir); +@@ -101,6 +104,8 @@ class enigma_driver_gnupg extends enigma_driver + catch (Exception $e) { + return $this->get_error_from_exception($e); + } ++ ++ $this->db_sync(); + } + + /** +@@ -228,10 +233,16 @@ class enigma_driver_gnupg extends enigma_driver + $this->gpg->addPassphrase($keyid, $pass); + } + +- if ($isfile) +- return $this->gpg->importKeyFile($content); +- else +- return $this->gpg->importKey($content); ++ if ($isfile) { ++ $result = $this->gpg->importKeyFile($content); ++ } ++ else { ++ $result = $this->gpg->importKey($content); ++ } ++ ++ $this->db_save(); ++ ++ return $result; + } + catch (Exception $e) { + return $this->get_error_from_exception($e); +@@ -369,12 +380,14 @@ class enigma_driver_gnupg extends enigma_driver + $type = ($key->subkeys[$i]->usage & enigma_key::CAN_ENCRYPT) ? 'priv' : 'pub'; + $result = $this->{'delete_' . $type . 'key'}($key->subkeys[$i]->id); + if ($result !== true) { +- return $result; ++ break; + } + } + } + } + ++ $this->db_save(); ++ + return $result; + } + +@@ -526,6 +539,147 @@ class enigma_driver_gnupg extends enigma_driver + return $ekey; + } + ++ /** ++ * Syncronize keys database on multi-host setups ++ */ ++ protected function db_sync() ++ { ++ if (!$this->rc->config->get('enigma_multihost')) { ++ return; ++ } ++ ++ $db = $this->rc->get_dbh(); ++ $table = $db->table_name('filestore', true); ++ ++ $result = $db->query( ++ "SELECT `file_id`, `filename`, `mtime` FROM $table" ++ . " WHERE `user_id` = ? AND `filename` IN (" . $db->array2list($this->db_files) . ")", ++ $this->rc->user->ID ++ ); ++ ++ while ($record = $db->fetch_assoc($result)) { ++ $file = $this->homedir . '/' . $record['filename']; ++ $mtime = @filemtime($file); ++ ++ if ($mtime < $record['mtime']) { ++ $data_result = $db->query("SELECT `data`, `mtime` FROM $table" ++ . " WHERE `file_id` = ?", $record['file_id']); ++ ++ $data = $db->fetch_assoc($data_result); ++ $data = $data ? base64_decode($data['data']) : null; ++ ++ if ($data === null || $data === false) { ++ rcube::raise_error(array( ++ 'code' => 605, 'line' => __LINE__, 'file' => __FILE__, ++ 'message' => "Enigma: Failed to sync $file ({$record['file_id']}). Decode error." ++ ), true, false); ++ ++ continue; ++ } ++ ++ $tmpfile = $file . '.tmp'; ++ ++ if (file_put_contents($tmpfile, $data, LOCK_EX) === strlen($data)) { ++ rename($tmpfile, $file); ++ touch($file, $data_record['mtime']); ++ ++ if ($this->debug) { ++ $this->debug("SYNC: Fetched file: $file"); ++ } ++ } ++ else { ++ // error ++ @unlink($tmpfile); ++ ++ rcube::raise_error(array( ++ 'code' => 605, 'line' => __LINE__, 'file' => __FILE__, ++ 'message' => "Enigma: Failed to sync $file." ++ ), true, false); ++ } ++ } ++ } ++ ++ // No records found, do initial sync if already have the keyring ++ if (!$db->is_error($result) && empty($file)) { ++ $this->db_save(true); ++ } ++ } ++ ++ /** ++ * Save keys database for multi-host setups ++ */ ++ protected function db_save($is_empty = false) ++ { ++ if (!$this->rc->config->get('enigma_multihost')) { ++ return true; ++ } ++ ++ $db = $this->rc->get_dbh(); ++ $table = $db->table_name('filestore', true); ++ $records = array(); ++ ++ if (!$is_empty) { ++ $result = $db->query( ++ "SELECT `file_id`, `filename`, `mtime` FROM $table" ++ . " WHERE `user_id` = ? AND `filename` IN (" . $db->array2list($this->db_files) . ")", ++ $this->rc->user->ID ++ ); ++ ++ while ($record = $db->fetch_assoc($result)) { ++ $records[$record['filename']] = $record; ++ } ++ } ++ ++ foreach ($this->db_files as $filename) { ++ $file = $this->homedir . '/' . $filename; ++ $mtime = @filemtime($file); ++ ++ if ($mtime && (empty($records[$filename]) || $mtime > $records[$filename]['mtime'])) { ++ $data = file_get_contents($file); ++ $data = base64_encode($data); ++ $datasize = strlen($data); ++ ++ if (empty($maxsize)) { ++ $maxsize = min($db->get_variable('max_allowed_packet', 1048500), 4*1024*1024) - 2000; ++ } ++ ++ if ($datasize > $maxsize) { ++ rcube::raise_error(array( ++ 'code' => 605, 'line' => __LINE__, 'file' => __FILE__, ++ 'message' => "Enigma: Failed to save $file. Size exceeds max_allowed_packet." ++ ), true, false); ++ ++ continue; ++ } ++ ++ if (empty($records[$filename])) { ++ $result = $db->query( ++ "INSERT INTO $table (`user_id`, `filename`, `mtime`, `data`)" ++ . " VALUES(?, ?, ?, ?)", ++ $this->rc->user->ID, $filename, $mtime, $data); ++ } ++ else { ++ $result = $db->query( ++ "UPDATE $table SET `mtime` = ?, `data` = ? WHERE `file_id` = ?", ++ $mtime, $data, $records[$filename]['file_id']); ++ } ++ ++ if ($db->is_error($result)) { ++ rcube::raise_error(array( ++ 'code' => 605, 'line' => __LINE__, 'file' => __FILE__, ++ 'message' => "Enigma: Failed to save $file into database." ++ ), true, false); ++ ++ break; ++ } ++ ++ if ($this->debug) { ++ $this->debug("SYNC: Pushed file: $file"); ++ } ++ } ++ } ++ } ++ + /** + * Write debug info from Crypt_GPG to logs/enigma + */
View file
debian.changelog
Changed
@@ -1,3 +1,9 @@ +roundcubemail (1.3.4-0~kolab3) unstable; urgency=low + + * Check in 14 revisions ahead of upstream 1.3.4 release + + -- Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Thu, 8 Mar 2018 11:11:11 +0200 + roundcubemail (1.3.4-0~kolab2) unstable; urgency=low * Check in 12 revisions ahead of upstream 1.3.4 release
View file
debian.series
Changed
@@ -10,3 +10,6 @@ 0010-Change-wording.patch -p1 0011-Remove-redundant-trim.patch -p1 0012-Update-composer-reference-to-endroid-qr-code-6132.patch -p1 +0013-Added-9pt-and-11pt-to-the-list-of-font-sizes-in-HTML.patch -p1 +0014-Fix-handling-encoding-of-HTML-tags-in-inline-JSON-ou.patch -p1 +enigma-multihost.patch -p1
View file
roundcubemail.dsc
Changed
@@ -2,7 +2,7 @@ Source: roundcubemail Binary: roundcubemail Architecture: all -Version: 1:1.3.4-0~kolab2 +Version: 1:1.3.4-0~kolab3 Maintainer: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Uploaders: Paul Klos <kolab@klos2day.nl> Homepage: http://www.roundcube.net/
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.