Overview

Request 2183 (accepted)

Updated package from Winterfell


kolab-freebusy.spec Changed
x
 
1
@@ -24,7 +24,7 @@
2
 
3
 Name:           kolab-freebusy
4
 Version:        1.1.0
5
-Release:        1%{?dist}
6
+Release:        2%{?dist}
7
 Summary:        Kolab Free/Busy Web Presentation Layer
8
 
9
 Group:          Applications/Internet
10
@@ -163,6 +163,9 @@
11
 %attr(0770,root,%{httpd_group}) %{_localstatedir}/log/%{name}
12
 
13
 %changelog
14
+* Wed Feb  7 2018 Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> - 1.1.0-2
15
+- Repack of tagged version
16
+
17
 * Thu Jun 15 2017 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 1.1.0-1
18
 - Release 1.1.0
19
 
20
debian.changelog Changed
25
 
1
@@ -1,3 +1,23 @@
2
+kolab-freebusy (1.1.0-0~kolab3) unstable; urgency=low
3
+
4
+  * Fix autoloader configuration
5
+  * Add missing dependency on php-sabre-vobject-3
6
+  * Add debian/source/format
7
+
8
+ -- Christoph Erhardt <kolab@sicherha.de>  Fri, 16 Feb 2018 16:34:51 +0100
9
+
10
+kolab-freebusy (1.1.0-0~kolab2) unstable; urgency=low
11
+
12
+  * Repack of tagged version
13
+
14
+ -- Jeroen van Meeuwen <vanmeeuwen@kolabsys.com>  Wed,  7 Feb 2018 12:00:22 +0200
15
+
16
+kolab-freebusy (1.1.0-0~kolab1mic1) unstable; urgency=low
17
+
18
+  * fix pbuilder builds
19
+
20
+ -- hede <kolab983@der-he.de>  Sun, 06 Aug 2017 10:00:12 +0200
21
+
22
 kolab-freebusy (1.1.0-0~kolab1) unstable; urgency=low
23
 
24
   * Release of version 1.1.0
25
debian.control Changed
9
 
1
@@ -13,6 +13,7 @@
2
 Depends: ${misc:Depends},
3
         php-monolog,
4
         php-net-ldap3,
5
+        php-sabre-vobject-3,
6
         roundcubemail-core,
7
         roundcubemail-plugins-kolab
8
 Description: Free/Busy for Kolab Groupware
9
debian.rules Changed
19
 
1
@@ -15,9 +15,14 @@
2
        rm -rf composer.json ; \
3
        mv composer.json-dist composer.json ; \
4
    fi
5
-   mkdir -p $$HOME/.composer/
6
-   echo '{}' > $$HOME/.composer/composer.json
7
-   composer -vvv dumpautoload --optimize
8
+   mkdir -p $(CURDIR)/debian/home/.composer/
9
+   echo '{}' > $(CURDIR)/debian/home/.composer/composer.json
10
+   patch -p1 < debian/patches/add-composer-autoloader.diff || :
11
+   HOME=$(CURDIR)/debian/home/ composer -vvv dumpautoload --optimize
12
+   sed -i -e "s|.baseDir . '/../../../share|'/usr/share|" $(CURDIR)/vendor/composer/autoload_psr4.php
13
+   sed -i -e "s|.baseDir . '/../../../share|'/usr/share|" $(CURDIR)/vendor/composer/autoload_namespaces.php
14
+   sed -i -e "s|.baseDir . '/../../../share|'/usr/share|" $(CURDIR)/vendor/composer/autoload_classmap.php
15
+   sed -i -e "s|__DIR__ . '/../..' . '/../../../share|'/usr/share|" $(CURDIR)/vendor/composer/autoload_static.php || true
16
 
17
    dh_install --list-missing -XLICENSE
18
 
19
debian.tar.gz/patches Added
2
 
1
+(directory)
2
debian.tar.gz/patches/add-composer-autoloader.diff Added
14
 
1
@@ -0,0 +1,12 @@
2
+Index: kolab-freebusy-1.1.0/composer.json
3
+===================================================================
4
+--- kolab-freebusy-1.1.0/composer.json
5
++++ kolab-freebusy-1.1.0-orig/composer.json
6
+@@ -8,6 +8,7 @@
7
+           "": "/usr/share/pear/"
8
+       },
9
+       "psr-4": {
10
++          "Sabre\\": "/usr/share/php/sabre21/Sabre/",
11
+           "": "/usr/share/php/"
12
+       }
13
+   }
14
debian.tar.gz/source Added
2
 
1
+(directory)
2
debian.tar.gz/source/format Added
3
 
1
@@ -0,0 +1,1 @@
2
+1.0
3
kolab-freebusy-1.1.0.tar.gz/autogen.sh Changed
10
 
1
@@ -42,7 +42,7 @@
2
     exit 1
3
 fi
4
 
5
-mv composer-dist.json composer.json
6
+mv composer.json-dist composer.json
7
 
8
 ./composer.phar install --no-dev
9
 
10
kolab-freebusy-1.1.0.tar.gz/doc/kolab-freebusy.config.ini Changed
10
 
1
@@ -16,6 +16,8 @@
2
 ; base_dn = "dc=yourdomain,dc=com"
3
 ; filter = "(&(|(mail=%s)(alias=%s)(uid=%s))(objectclass=inetorgperson))"  ; optional, %s is replaced by the username
4
 
5
+;; Enables session token authentication
6
+; allow_token = true
7
 
8
 ;; Allow privileged access from these IPs
9
 [trustednetworks]
10
kolab-freebusy-1.1.0.tar.gz/lib/Kolab/FreeBusy/HTTPAuth.php Changed
66
 
1
@@ -23,6 +23,7 @@
2
 
3
 namespace Kolab\FreeBusy;
4
 
5
+use \Kolab\Config;
6
 use \Net_LDAP3;
7
 use \Monolog\Logger as Monolog;
8
 
9
@@ -40,6 +41,15 @@
10
    {
11
        $logger = Logger::get('httpauth');
12
 
13
+       // First try token authentication if enabled and user/token detected in the URL
14
+       if (!empty($_SERVER['FREEBUSY_URI'])
15
+           && Config::boolean($config['allow_token'])
16
+           && preg_match('|([^@/]+@[^@/]+)/([a-f0-9]{32})/[^/]+$|', $_SERVER['FREEBUSY_URI'], $matches)
17
+           && self::checkToken($config, $matches[1], $matches[2])
18
+       ) {
19
+           return true;
20
+       }
21
+
22
        // no http auth submitted, abort!
23
        if (empty($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW'])) {
24
            $logger->addDebug('No HTTP auth submitted');
25
@@ -118,6 +128,40 @@
26
    }
27
 
28
    /**
29
+    * Validate user token and credentials from freebusy_auth cache
30
+    */
31
+   private static function checkToken($config, $user, $token)
32
+   {
33
+       // See 'ready' hook handler in kolab_auth plugin
34
+       // for details on how the token auth (cache) entries are created
35
+
36
+       // load the Roundcube framework with its autoloader
37
+       require_once KOLAB_FREEBUSY_ROOT . '/lib/Roundcube/bootstrap.php';
38
+
39
+       $rcube  = \rcube::get_instance(\rcube::INIT_WITH_DB | \rcube::INIT_WITH_PLUGINS);
40
+       $ip     = \rcube_utils::remote_addr();
41
+       $key    = md5("$token:$ip:$user");
42
+       $valid  = false;
43
+
44
+       $rcube->config->set('freebusy_auth_cache', 'db');
45
+       $cache = $rcube->get_cache_shared('freebusy_auth', false);
46
+
47
+       if ($cache && ($deadline = $cache->get($key))) {
48
+           $now      = new \DateTime('now', new \DateTimeZone('UTC'));
49
+           $deadline = new \DateTime($deadline);
50
+
51
+           if ($deadline >= $now) {
52
+               $valid = true;
53
+           }
54
+       }
55
+
56
+       $status = $valid ? 'SUCCESS' : 'FAILURE';
57
+       Logger::get('httpauth')->addInfo("Token: authenticating user $user/$token/$ip: $status");
58
+
59
+       return $valid;
60
+   }
61
+
62
+   /**
63
     * Callback for Net_LDAP3 logging
64
     */
65
    public static function ldapLog($level, $msg)
66
kolab-freebusy-1.1.0.tar.gz/lib/Kolab/FreeBusy/SourceIMAP.php Changed
14
 
1
@@ -29,12 +29,6 @@
2
 use Sabre\VObject\FreeBusyGenerator;
3
 use Sabre\VObject\ParseException;
4
 
5
-// configure env for Roundcube framework
6
-define('RCUBE_INSTALL_PATH', KOLAB_FREEBUSY_ROOT . '/');
7
-define('RCUBE_CONFIG_DIR',   KOLAB_FREEBUSY_ROOT . '/config/');
8
-define('RCUBE_PLUGINS_DIR',  KOLAB_FREEBUSY_ROOT . '/lib/plugins/');
9
-
10
-
11
 
12
 /**
13
  * Implementation of a Free/Busy data source reading from IMAP
14
kolab-freebusy-1.1.0.tar.gz/lib/Kolab/FreeBusy/Utils.php Changed
14
 
1
@@ -86,6 +86,12 @@
2
                continue;
3
            }
4
 
5
+           // special entries that allow all IPs
6
+           if ($range === '*' || $range === 'all' || $range === '0/0'
7
+               || $range === '0.0.0.0/0' || $range === '0.0.0.0/0.0.0.0') {
8
+               return true;
9
+           }
10
+
11
            // quick substring check (e.g. 192.168.0.)
12
            if (( $ipv6 && strpos($ipbin, self::ip6net2bits($range)) === 0) ||
13
                (!$ipv6 && strpos($ip, rtrim($range, '*')) === 0)) {
14
kolab-freebusy-1.1.0.tar.gz/public_html/index.php Changed
41
 
1
@@ -27,6 +27,11 @@
2
 
3
 define('KOLAB_FREEBUSY_ROOT', realpath('../'));
4
 
5
+// configure env for Roundcube framework
6
+define('RCUBE_INSTALL_PATH', KOLAB_FREEBUSY_ROOT . '/');
7
+define('RCUBE_CONFIG_DIR',   KOLAB_FREEBUSY_ROOT . '/config/');
8
+define('RCUBE_PLUGINS_DIR',  KOLAB_FREEBUSY_ROOT . '/lib/plugins/');
9
+
10
 // suppress error notices
11
 ini_set('error_reporting', E_ALL &~ E_NOTICE);
12
 
13
@@ -61,8 +66,12 @@
14
        $log->addDebug('Request (redirect): ' . $uri, array('ip' => $remote_ip, 'trusted' => $trusted_ip));
15
    }
16
 
17
+   list($uri, $args) = explode('?', $uri);
18
+
19
    // check HTTP authentication
20
    if (!$trusted_ip && $config->httpauth) {
21
+       $_SERVER['FREEBUSY_URI'] = urldecode(rtrim($uri, '/'));
22
+
23
        if (!HTTPAuth::check($config->httpauth)) {
24
            $log->addDebug("Abort with 401 Unauthorized");
25
            header('WWW-Authenticate: Basic realm="Kolab Free/Busy Service"');
26
@@ -74,12 +83,9 @@
27
    #header('Content-type: text/calendar; charset=utf-8', true);
28
    header('Content-type: text/plain; charset=utf-8', true);
29
 
30
-   list($uri, $args) = explode('?', $uri);
31
-
32
    // analyse request
33
-   $url = array_filter(explode('/', $uri));
34
-   $user = strtolower(array_pop($url));
35
-   $action = strtolower(array_pop($url));
36
+   $url      = array_filter(explode('/', $uri));
37
+   $user     = strtolower(array_pop($url));
38
    $extended = false;
39
 
40
    // remove file extension
41
kolab-freebusy.dsc Changed
10
 
1
@@ -2,7 +2,7 @@
2
 Source: kolab-freebusy
3
 Binary: kolab-freebusy
4
 Architecture: all
5
-Version: 1.1.0-0~kolab1
6
+Version: 1.1.0-0~kolab3
7
 Maintainer: Jeroen van Meeuwen <vanmeeuwen@kolabsys.com>
8
 Homepage: http://www.kolab.org
9
 Standards-Version: 3.9.3
10
Refresh
Refresh
Request History
Christoph Erhardt's avatar

sicherha created request about 7 years ago

Updated package from Winterfell


Christoph Erhardt's avatar

sicherha accepted request about 7 years ago