Projects
Kolab:16
kolab-autoconf
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 15
View file
kolab-autoconf.spec
Changed
@@ -29,7 +29,7 @@ %global _ap_sysconfdir %{_sysconfdir}/%{httpd_name} Name: kolab-autoconf -Version: 1.3.3 +Version: 1.3.4 Release: 1%{?dist} Summary: Autodiscovery for clients of Kolab Groupware @@ -83,6 +83,9 @@ %attr(0750,%{httpd_user},%{httpd_group}) %{_var}/log/%{name} %changelog +* Wed Sep 1 2021 Jeroen van Meeuwen <vanmeeuwen@apheleia-it.ch> - 1.3.4-1 +- Release of version 1.3.4 + * Thu Jun 24 2021 Jeroen van Meeuwen <vanmeeuwen@apheleia-it.ch> - 1.3.3-1 - Release of version 1.3.3
View file
debian.changelog
Changed
@@ -1,3 +1,9 @@ +kolab-autoconf (1.3.4-1) unstable; urgency=medium + + * Release 1.3.4 + + -- Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> Wed, 1 Sep 2021 16:24:02 +0100 + kolab-autoconf (1.3.3-1) unstable; urgency=medium * Fix LDAP authentication regression
View file
kolab-autoconf-1.3.3.tar.gz/lib/AutodiscoverJson.php -> kolab-autoconf-1.3.4.tar.gz/lib/AutodiscoverJson.php
Changed
@@ -31,11 +31,38 @@ public function handle_request() { + Log::debug('Request [json]: ' . $_SERVER['REQUEST_URI']); + + $supportedProtocols = array('autodiscoverv1' => 'AutodiscoverV1'); + if ($this->conf->get('autodiscover', 'activesync')) { + $supportedProtocols['activesync'] = 'ActiveSync'; + } + + $protocol = isset($_GET['Protocol']) ? $_GET['Protocol'] : ''; + + // Exit early on unsupported protocol + if (empty($protocol) || !isset($supportedProtocols[strtolower($protocol)])) { + $json = array( + 'ErrorCode' => 'ProtocolNotSupported', + 'ErrorMessage' => 'The given protocol value \u0027' . $protocol . '\u0027 is invalid.' + . ' Supported values are \u0027' . implode(',', $supportedProtocols) . '\u0027' + ); + + $response = json_encode($json, JSON_PRETTY_PRINT); + Log::debug('Response [json]: ' . $response); + + http_response_code(400); + header('Content-Type: application/json; charset=' . Autodiscover::CHARSET); + echo $response; + exit; + } + if (preg_match('|autodiscover.json/v1.0/([^\?]+)|', $_SERVER['REQUEST_URI'], $regs)) { $this->email = $regs[1]; } - - Log::debug('Request [json]: ' . $_SERVER['REQUEST_URI']); + else if (!empty($_GET['Email'])) { + $this->email = $_GET['Email']; + } } /** @@ -56,21 +83,10 @@ } elseif (strtolower($_GET['Protocol']) == 'autodiscoverv1') { $json = array( - 'Protocol' => 'ActiveSync', + 'Protocol' => 'AutodiscoverV1', 'Url' => 'https://' . $_SERVER['HTTP_HOST'] . '/Autodiscover/Autodiscover.xml' ); } - else { - http_response_code(400); - $json = array( - 'ErrorCore' => 'InvalidProtocol', - 'ErrorMessage' => 'The given protocol value \u0027' - . $_GET['Protocol'] - . '\u0027 is invalid. Supported values are \u0027' - . (!empty($this->config['activesync']) ? 'ActiveSync,' : '') - . 'AutodiscoverV1\u0027' - ); - } $response = json_encode($json, JSON_PRETTY_PRINT); Log::debug('Response [json]: ' . $response);
View file
kolab-autoconf-1.3.3.tar.gz/lib/AutodiscoverMicrosoft.php -> kolab-autoconf-1.3.4.tar.gz/lib/AutodiscoverMicrosoft.php
Changed
@@ -75,6 +75,10 @@ $this->error("Invalid input"); } + if ($this->conf->get('autodiscover', 'mobilesync_only') && $this->type != 'mobilesync') { + $this->error("Only mobilesync schema supported"); + } + // check for basic authentication if ldap is available if ($this->conf->get('ldap_uri', false)) { Log::debug('Request [microsoft]: Basic Auth Username: ' . ($_SERVER['PHP_AUTH_USER'] ?: 'none')); @@ -83,7 +87,8 @@ } // basic auth username must match with given email address - if ($_SERVER['PHP_AUTH_USER'] != $this->email) { + if (strcasecmp($_SERVER['PHP_AUTH_USER'], $this->email) != 0) { + Log::debug("The submitted user {$_SERVER['PHP_AUTH_USER']} does not match the email address {$this->email}"); $this->unauthorized(); } @@ -211,7 +216,7 @@ $email = $xml->createElement('AutoDiscoverSMTPAddress'); $email = $user->appendChild($email); - $email->appendChild($xml->createTextNode($this->config['email'])); + $email->appendChild($xml->createTextNode($this->config['login'] ?: $this->config['email'])); // @TODO: Microsoft supports also DAV protocol here foreach (array('imap', 'pop3', 'smtp') as $type) {
View file
kolab-autoconf.dsc
Changed
@@ -2,7 +2,7 @@ Source: kolab-autoconf Binary: kolab-autoconf Architecture: all -Version: 1.3.3-1 +Version: 1.3.4-1 Maintainer: Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> Uploaders: Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> Homepage: http://www.kolab.org/ @@ -13,5 +13,5 @@ Package-List: kolab-autoconf deb admin extra Files: - 00000000000000000000000000000000 0 kolab-autoconf-1.3.3.tar.gz + 00000000000000000000000000000000 0 kolab-autoconf-1.3.4.tar.gz 00000000000000000000000000000000 0 debian.tar.gz
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
.