***EDIT***
/usr/local/cpanel/base/3rdparty/roundcube/index.php
else if ($RCMAIL->action == 'save-pref') {
include INSTALL_PATH . 'program/steps/utils/save_pref.inc';
}
else if ($RCMAIL->action == 'save-pref') {
//include INSTALL_PATH . 'program/steps/utils/save_pref.inc';
echo "Oops";
die;
}
/usr/local/cpanel/base/3rdparty/roundcube/program/steps/utils/save_pref.inc
$name = get_input_value('_name', RCUBE_INPUT_POST);
$value = get_input_value('_value', RCUBE_INPUT_POST);
$whitelist = array(
'preview_pane',
'list_cols',
'collapsed_folders',
'collapsed_abooks',
);
if (!in_array($name, array_merge($whitelist, $RCMAIL->plugins->allowed_prefs))) {
raise_error(array('code' => 500, 'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
'message' => sprintf("Hack attempt detected (user: %s)", $_SESSION['username'])),
true, false);
$OUTPUT->reset();
$OUTPUT->send();
}
wget -O /usr/local/cpanel/src/3rdparty/gpl/patches/roundcube/0004-save-pref-0day.patch "http://downloads.sourceforge.net/project/roundcubemail/roundcubemail/0.8.5/save_prefs_vulnerability_fix_0.8.patch"
/usr/local/cpanel/bin/update-roundcube --force
rm -fv /usr/local/cpanel/src/3rdparty/gpl/patches/roundcube/0004-save-pref-0day.patch
Hello,
Propose the following quick workaround to apply upstream patch on cPanel server:
Code:wget -O /usr/local/cpanel/src/3rdparty/gpl/patches/roundcube/0004-save-pref-0day.patch "http://downloads.sourceforge.net/project/roundcubemail/roundcubemail/0.8.5/save_prefs_vulnerability_fix_0.8.patch" /usr/local/cpanel/bin/update-roundcube --force
# /usr/local/cpanel/bin/update-roundcube --force
Roundcube update from 0.8.4.cp3 to 0.8.4.cp3 in progress.
Roundcube will be locked out during this process.
Updating RoundCube (using cPanel version)
info [update-roundcube] Applied patch '0001-Apply-default-values-for-cPanel-webmail-environment.patch'
patching file config/db.inc.php.dist
patching file config/main.inc.php.dist
patching file index.php
patching file program/include/rcube_imap.php
patching file program/include/rcube_imap_generic.php
info [update-roundcube] Applied patch '0002-append-INBOX.-to-avoid-UID-COPY-Unknown-namespace-er.patch'
patching file config/main.inc.php.dist
info [update-roundcube] Applied patch '0003-User-can-select-a-different-skin-when-its-choice-is-.patch'
patching file program/include/rcube_template.php
info [update-roundcube] Applied patch '0004-save-pref-0day.patch'
patching file program/include/rcube_plugin.php
patching file program/include/rcube_plugin_api.php
patching file program/steps/mail/sendmail.inc
patching file program/steps/utils/save_pref.inc
info [update-roundcube] Successfully applied 4 patches
INFO - Applied cPanel patches (if any) to Roundcube source.
Archiving current Roundcube data to /var/cpanel/roundcube/roundcube.backup.sql.1364494007
Roundcube DB successfully archived
-rw------- 1 root root 2155232 Mar 28 18:06 /var/cpanel/roundcube/roundcube.backup.sql.1364494007
Cleaning old Roundcube data archives
Removing old backup: roundcube.backup.sql.1351372952
Schema update to 0.8.4 was successful
It was very nice of you to provide those easy-to-follow instructions for everyone. I had already manually patched mine (by editing all of the necesssary files), but I went through and did it this way now since it's a lot cleaner and I can be sure it was applied properly.Hello,
Propose the following quick workaround to apply upstream patch on cPanel server:
Code:wget -O /usr/local/cpanel/src/3rdparty/gpl/patches/roundcube/0004-save-pref-0day.patch "http://downloads.sourceforge.net/project/roundcubemail/roundcubemail/0.8.5/save_prefs_vulnerability_fix_0.8.patch" /usr/local/cpanel/bin/update-roundcube --force
That "Patch Your Roundcube Installation" link doesn't work. The most recent patch that Lik posted above was directly from Roundcube and worked just fine for me. I think I'll leave it in place until a patched version can immediately be deployed to my servers with a cPanel update. Better to be safe than sorry. If one follows Lik's instructions completely, there is nothing residual to be interfere with any cPanel update down the road.Hello,
An update with an official patch will be happening shortly for 11.36, 11.34 and 11.32 for Roundcube. Until that time, if you have used any other method to add a patch, please remove it, since it could override our patch and does not necessarily handle the security issue properly without breaking other functionality depending on which patch you might have used.
We do have documentation online on an alternative method until the patch release into each of the cPanel extant versions:
Patch Your RoundCube Installation
Thanks!