[Midnightbsd-cvs] mports [22170] trunk/mail/roundcube: update roundcube

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Wed Dec 28 10:00:49 EST 2016


Revision: 22170
          http://svnweb.midnightbsd.org/mports/?rev=22170
Author:   laffer1
Date:     2016-12-28 10:00:49 -0500 (Wed, 28 Dec 2016)
Log Message:
-----------
update roundcube

Modified Paths:
--------------
    trunk/mail/roundcube/Makefile
    trunk/mail/roundcube/distinfo

Added Paths:
-----------
    trunk/mail/roundcube/files/patch-program_lib_Roundcube_rcube_session_db.php

Modified: trunk/mail/roundcube/Makefile
===================================================================
--- trunk/mail/roundcube/Makefile	2016-12-28 02:02:41 UTC (rev 22169)
+++ trunk/mail/roundcube/Makefile	2016-12-28 15:00:49 UTC (rev 22170)
@@ -2,10 +2,10 @@
 # $FreeBSD: head/mail/roundcube/Makefile 369697 2014-10-01 07:13:26Z ale $
 
 PORTNAME=	roundcube
-DISTVERSION=	1.2.2
+DISTVERSION=	1.2.3
 PORTEPOCH=	1
 CATEGORIES?=	mail www
-MASTER_SITES=	https://github.com/roundcube/roundcubemail/releases/download/1.2.2/
+MASTER_SITES=	https://github.com/roundcube/roundcubemail/releases/download/${DISTVERSION}/
 DISTNAME=	${PORTNAME}mail-${DISTVERSION}-complete
 
 MAINTAINER?=	ports at MidnightBSD.org

Modified: trunk/mail/roundcube/distinfo
===================================================================
--- trunk/mail/roundcube/distinfo	2016-12-28 02:02:41 UTC (rev 22169)
+++ trunk/mail/roundcube/distinfo	2016-12-28 15:00:49 UTC (rev 22170)
@@ -1,3 +1,2 @@
-TIMESTAMP = 1475867046
-SHA256 (roundcubemail-1.2.2-complete.tar.gz) = b919e797b8bf5ed34748d067dc281f45f29ad71dbad8904bdc0e2258912666ef
-SIZE (roundcubemail-1.2.2-complete.tar.gz) = 3857397
+SHA256 (roundcubemail-1.2.3-complete.tar.gz) = d7f1d041557639c442691a1e5fa791ab77aa97327a0d328a22e0220f3cb2ca97
+SIZE (roundcubemail-1.2.3-complete.tar.gz) = 3894127

Added: trunk/mail/roundcube/files/patch-program_lib_Roundcube_rcube_session_db.php
===================================================================
--- trunk/mail/roundcube/files/patch-program_lib_Roundcube_rcube_session_db.php	                        (rev 0)
+++ trunk/mail/roundcube/files/patch-program_lib_Roundcube_rcube_session_db.php	2016-12-28 15:00:49 UTC (rev 22170)
@@ -0,0 +1,71 @@
+--- program/lib/Roundcube/rcube_session_db.php.orig	2016-05-22 11:06:47 UTC
++++ program/lib/Roundcube/rcube_session_db.php
+@@ -32,6 +32,7 @@ class rcube_session_db extends rcube_ses
+ {
+     private $db;
+     private $table_name;
++    private $need_base64;
+ 
+     /**
+      * @param Object $config
+@@ -39,6 +40,9 @@ class rcube_session_db extends rcube_ses
+     public function __construct($config)
+     {
+         parent::__construct($config);
++        
++        // base64 encode if suhosin is not enabled
++        $this->need_base64 = ini_get("suhosin.session.encrypt") !== "1";
+ 
+         // get db instance
+         $this->db = rcube::get_instance()->get_dbh();
+@@ -103,7 +107,7 @@ class rcube_session_db extends rcube_ses
+             $this->time_diff = time() - strtotime($sql_arr['ts']);
+             $this->changed   = strtotime($sql_arr['changed']);
+             $this->ip        = $sql_arr['ip'];
+-            $this->vars      = base64_decode($sql_arr['vars']);
++            $this->vars      = $this->_decode($sql_arr['vars']);
+             $this->key       = $key;
+ 
+             return !empty($this->vars) ? (string) $this->vars : '';
+@@ -126,7 +130,7 @@ class rcube_session_db extends rcube_ses
+         $this->db->query("INSERT INTO {$this->table_name}"
+             . " (`sess_id`, `vars`, `ip`, `created`, `changed`)"
+             . " VALUES (?, ?, ?, $now, $now)",
+-            $key, base64_encode($vars), (string)$this->ip);
++            $key, $this->_encode($vars), (string)$this->ip);
+ 
+         return true;
+     }
+@@ -150,7 +154,7 @@ class rcube_session_db extends rcube_ses
+         if ($newvars !== $oldvars) {
+             $this->db->query("UPDATE {$this->table_name} "
+                 . "SET `changed` = $now, `vars` = ? WHERE `sess_id` = ?",
+-                base64_encode($newvars), $key);
++                $this->_encode($newvars), $key);
+         }
+         else if ($ts - $this->changed + $this->time_diff > $this->lifetime / 2) {
+             $this->db->query("UPDATE {$this->table_name} SET `changed` = $now"
+@@ -173,4 +177,23 @@ class rcube_session_db extends rcube_ses
+             . date('Y-m-d H:i:s', time() - $this->gc_enabled)
+             . '; rows = ' . intval($this->db->affected_rows()));
+     }
++
++    private function _encode($vars)
++    {
++        if ($this->need_base64) {
++            return base64_encode($vars);
++        } else {
++            return $vars;
++        }
++    }
++
++    private function _decode($vars) 
++    {
++        if ($this->need_base64) {
++            return base64_decode($vars);
++        } else {
++            return $vars;
++        }
++    }
++
+ }


Property changes on: trunk/mail/roundcube/files/patch-program_lib_Roundcube_rcube_session_db.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property


More information about the Midnightbsd-cvs mailing list