aboutsummaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorAlex Dupre <ale@FreeBSD.org>2011-10-06 09:50:43 +0000
committerAlex Dupre <ale@FreeBSD.org>2011-10-06 09:50:43 +0000
commit12e5a4bb2c436b91c92c48ea95d7c6c362ff52a8 (patch)
treea7c6ffdf601edcf7b4e7d387ba332772dcfe44f5 /mail
parent1f139036373353308aa2d227ce7fd637494c7fa1 (diff)
downloadports-12e5a4bb2c436b91c92c48ea95d7c6c362ff52a8.tar.gz
ports-12e5a4bb2c436b91c92c48ea95d7c6c362ff52a8.zip
Notes
Diffstat (limited to 'mail')
-rw-r--r--mail/roundcube/Makefile7
-rw-r--r--mail/roundcube/distinfo4
-rw-r--r--mail/roundcube/files/patch-program_include_rcube_session.php200
3 files changed, 65 insertions, 146 deletions
diff --git a/mail/roundcube/Makefile b/mail/roundcube/Makefile
index 4c880a4fe72b..72ea4edac8ac 100644
--- a/mail/roundcube/Makefile
+++ b/mail/roundcube/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= roundcube
-DISTVERSION= 0.5.4
+DISTVERSION= 0.6
PORTEPOCH= 1
CATEGORIES?= mail www
MASTER_SITES= SF/${PORTNAME}mail/${PORTNAME}mail/${DISTVERSION:U}
@@ -100,7 +100,8 @@ post-patch:
${WRKSRC}/program/js/editor.js \
${WRKSRC}/program/localization/*/labels.inc \
${WRKSRC}/program/steps/addressbook/mailto.inc \
- ${WRKSRC}/skins/default/functions.js
+ ${WRKSRC}/skins/default/functions.js \
+ ${WRKSRC}/skins/default/includes/links.html
@${REINPLACE_CMD} "s/'mail|/'${MAIL}|/g" ${WRKSRC}/plugins/*/*.php
@${REINPLACE_CMD} "s/|mail'/|${MAIL}'/g" ${WRKSRC}/plugins/*/*.php
@${REINPLACE_CMD} "s/_task=mail/_task=${MAIL}/g" \
@@ -116,6 +117,8 @@ post-patch:
${WRKSRC}/skins/default/templates/login.html
@${MV} ${WRKSRC}/program/steps/mail \
${WRKSRC}/program/steps/${MAIL}
+ @${MV} ${WRKSRC}/skins/default/images/mail_footer.gif \
+ ${WRKSRC}/skins/default/images/${MAIL}_footer.gif
@${MV} ${WRKSRC}/skins/default/images/mail_footer.png \
${WRKSRC}/skins/default/images/${MAIL}_footer.png
@${MV} ${WRKSRC}/skins/default/images/mail_toolbar.gif \
diff --git a/mail/roundcube/distinfo b/mail/roundcube/distinfo
index 2434a2cd2d7a..2d50a45f4080 100644
--- a/mail/roundcube/distinfo
+++ b/mail/roundcube/distinfo
@@ -1,2 +1,2 @@
-SHA256 (roundcubemail-0.5.4.tar.gz) = 8562325c850edd9e83806b21c7bde1480c5d150cc5cb48beb014ef972a201ed5
-SIZE (roundcubemail-0.5.4.tar.gz) = 2291117
+SHA256 (roundcubemail-0.6.tar.gz) = 18d255c5317b5cbe68fb48494c39b2b3403c0452890f6159d22f876be49051cc
+SIZE (roundcubemail-0.6.tar.gz) = 2681342
diff --git a/mail/roundcube/files/patch-program_include_rcube_session.php b/mail/roundcube/files/patch-program_include_rcube_session.php
index 8422702fd8ea..4a5b05807e56 100644
--- a/mail/roundcube/files/patch-program_include_rcube_session.php
+++ b/mail/roundcube/files/patch-program_include_rcube_session.php
@@ -1,26 +1,57 @@
---- program/include/rcube_session.php.orig 2010-11-27 14:59:05.000000000 +0100
-+++ program/include/rcube_session.php 2010-12-13 17:50:47.000000000 +0100
-@@ -32,7 +32,6 @@
- private $db;
+--- program/include/rcube_session.php.orig 2011-09-21 14:22:40.000000000 +0200
++++ program/include/rcube_session.php 2011-10-04 18:06:20.000000000 +0200
+@@ -33,7 +33,6 @@
private $ip;
+ private $start;
private $changed;
- private $unsets = array();
private $gc_handlers = array();
- private $start;
+ private $cookiename = 'roundcube_sessauth';
private $vars = false;
-@@ -82,7 +81,7 @@
- if ($sql_arr = $this->db->fetch_assoc($sql_result)) {
- $this->changed = $sql_arr['changed'];
+@@ -132,7 +131,7 @@
+ if ($sql_result && ($sql_arr = $this->db->fetch_assoc($sql_result))) {
+ $this->changed = strtotime($sql_arr['changed']);
$this->ip = $sql_arr['ip'];
- $this->vars = base64_decode($sql_arr['vars']);
+ $this->vars = $sql_arr['vars'];
$this->key = $key;
if (!empty($this->vars))
-@@ -107,17 +106,6 @@
+@@ -169,15 +168,7 @@
}
if ($oldvars !== false) {
+- $newvars = $this->_fixvars($vars, $oldvars);
+-
+- if ($newvars !== $oldvars) {
+- $this->db->query(
+- sprintf("UPDATE %s SET vars=?, changed=%s WHERE sess_id=?",
+- get_table_name('session'), $now),
+- base64_encode($newvars), $key);
+- }
+- else if ($ts - $this->changed > $this->lifetime / 2) {
++ if ($ts - $this->changed > $this->lifetime / 2) {
+ $this->db->query("UPDATE ".get_table_name('session')." SET changed=$now WHERE sess_id=?", $key);
+ }
+ }
+@@ -186,7 +177,7 @@
+ sprintf("INSERT INTO %s (sess_id, vars, ip, created, changed) ".
+ "VALUES (?, ?, ?, %s, %s)",
+ get_table_name('session'), $now, $now),
+- $key, base64_encode($vars), (string)$this->ip);
++ $key, $vars, (string)$this->ip);
+ }
+
+ return true;
+@@ -194,29 +185,6 @@
+
+
+ /**
+- * Merge vars with old vars and apply unsets
+- */
+- private function _fixvars($vars, $oldvars)
+- {
+- if ($oldvars !== false) {
- $a_oldvars = $this->unserialize($oldvars);
- if (is_array($a_oldvars)) {
- foreach ((array)$this->unsets as $k)
@@ -31,37 +62,27 @@
- }
- else
- $newvars = $vars;
+- }
-
- if (!$this->lifetime) {
- $timeout = 600;
- }
-@@ -127,11 +115,11 @@
- $timeout = 0;
- }
-
-- if (!($newvars === $oldvars) || ($ts - $this->changed > $timeout)) {
-+ if (!($vars === $oldvars) || ($ts - $this->changed > $timeout)) {
- $this->db->query(
- sprintf("UPDATE %s SET vars = ?, changed = %s WHERE sess_id = ?",
- get_table_name('session'), $now),
-- base64_encode($newvars), $key);
-+ $vars, $key);
- }
- }
- else {
-@@ -139,10 +127,9 @@
- sprintf("INSERT INTO %s (sess_id, vars, ip, created, changed) ".
- "VALUES (?, ?, ?, %s, %s)",
- get_table_name('session'), $now, $now),
-- $key, base64_encode($vars), (string)$_SERVER['REMOTE_ADDR']);
-+ $key, $vars, (string)$_SERVER['REMOTE_ADDR']);
- }
-
- $this->unsets = array();
- return true;
- }
+- return $newvars;
+- }
+-
+-
+- /**
+ * Handler for session_destroy()
+ *
+ * @param string Session ID
+@@ -295,7 +263,7 @@
+ else // else read data again
+ $oldvars = $this->mc_read($key);
-@@ -212,112 +199,12 @@
+- $newvars = $oldvars !== false ? $this->_fixvars($vars, $oldvars) : $vars;
++ $newvars = $oldvars !== false ? $oldvars : $vars;
+
+ if ($newvars !== $oldvars || $ts - $this->changed > $this->lifetime / 2) {
+ $value = serialize(array('changed' => time(), 'ip' => $this->ip, 'vars' => $newvars));
+@@ -386,7 +354,6 @@
if (empty($var))
return $this->destroy(session_id());
@@ -69,108 +90,3 @@
unset($_SESSION[$var]);
return true;
- }
-
-
-- // serialize session data
-- private function serialize($vars)
-- {
-- $data = '';
-- if (is_array($vars))
-- foreach ($vars as $var=>$value)
-- $data .= $var.'|'.serialize($value);
-- else
-- $data = 'b:0;';
-- return $data;
-- }
--
--
-- // unserialize session data
-- // http://www.php.net/manual/en/function.session-decode.php#56106
-- private function unserialize($str)
-- {
-- $str = (string)$str;
-- $endptr = strlen($str);
-- $p = 0;
--
-- $serialized = '';
-- $items = 0;
-- $level = 0;
--
-- while ($p < $endptr) {
-- $q = $p;
-- while ($str[$q] != '|')
-- if (++$q >= $endptr) break 2;
--
-- if ($str[$p] == '!') {
-- $p++;
-- $has_value = false;
-- } else {
-- $has_value = true;
-- }
--
-- $name = substr($str, $p, $q - $p);
-- $q++;
--
-- $serialized .= 's:' . strlen($name) . ':"' . $name . '";';
--
-- if ($has_value) {
-- for (;;) {
-- $p = $q;
-- switch (strtolower($str[$q])) {
-- case 'n': /* null */
-- case 'b': /* boolean */
-- case 'i': /* integer */
-- case 'd': /* decimal */
-- do $q++;
-- while ( ($q < $endptr) && ($str[$q] != ';') );
-- $q++;
-- $serialized .= substr($str, $p, $q - $p);
-- if ($level == 0) break 2;
-- break;
-- case 'r': /* reference */
-- $q+= 2;
-- for ($id = ''; ($q < $endptr) && ($str[$q] != ';'); $q++) $id .= $str[$q];
-- $q++;
-- $serialized .= 'R:' . ($id + 1) . ';'; /* increment pointer because of outer array */
-- if ($level == 0) break 2;
-- break;
-- case 's': /* string */
-- $q+=2;
-- for ($length=''; ($q < $endptr) && ($str[$q] != ':'); $q++) $length .= $str[$q];
-- $q+=2;
-- $q+= (int)$length + 2;
-- $serialized .= substr($str, $p, $q - $p);
-- if ($level == 0) break 2;
-- break;
-- case 'a': /* array */
-- case 'o': /* object */
-- do $q++;
-- while ( ($q < $endptr) && ($str[$q] != '{') );
-- $q++;
-- $level++;
-- $serialized .= substr($str, $p, $q - $p);
-- break;
-- case '}': /* end of array|object */
-- $q++;
-- $serialized .= substr($str, $p, $q - $p);
-- if (--$level == 0) break 2;
-- break;
-- default:
-- return false;
-- }
-- }
-- } else {
-- $serialized .= 'N;';
-- $q += 2;
-- }
-- $items++;
-- $p = $q;
-- }
--
-- return unserialize( 'a:' . $items . ':{' . $serialized . '}' );
-- }
--
- public function set_keep_alive($keep_alive)
- {
- $this->keep_alive = $keep_alive;