Projects
Kolab:16
kolab-autoconf
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 13
View file
kolab-autoconf.spec
Changed
@@ -30,7 +30,7 @@ Name: kolab-autoconf Version: 1.3.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Autodiscovery for clients of Kolab Groupware Group: Applications/Internet @@ -39,6 +39,8 @@ Source0: http://mirror.kolabsys.com/pub/releases/%{name}-%{version}.tar.gz +Patch0001: 0001-Only-authenticate-against-ldap-if-ldap-is-available.patch + %if 0%{?plesk} < 1 Requires: php-kolab-net-ldap3 %endif @@ -53,6 +55,8 @@ %prep %setup -q +%patch0001 -p1 + %build %install @@ -83,6 +87,9 @@ %attr(0750,%{httpd_user},%{httpd_group}) %{_var}/log/%{name} %changelog +* Tue May 26 2020 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 1.3.2-2 +- Allow without LDAP authentication + * Mon Mar 2 2020 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 1.3.2-1 - Release of version 1.3.2
View file
0001-Only-authenticate-against-ldap-if-ldap-is-available.patch
Added
@@ -0,0 +1,75 @@ +From 1acbfdec364b726dc7fa71c3a81a3410f5f46863 Mon Sep 17 00:00:00 2001 +From: Christian Mollekopf <mollekopf@kolabsys.com> +Date: Tue, 26 May 2020 15:26:27 +0200 +Subject: [PATCH] Only authenticate against ldap if ldap is available. + +Summary: It isn't for plesk. + +Reviewers: #autoconf_developers + +Subscribers: machniak + +Differential Revision: https://git.kolab.org/D1279 +--- + lib/AutodiscoverMicrosoft.php | 31 ++++++++++++++++++------------- + 1 file changed, 18 insertions(+), 13 deletions(-) + +diff --git a/lib/AutodiscoverMicrosoft.php b/lib/AutodiscoverMicrosoft.php +index 9459098..314ebf3 100644 +--- a/lib/AutodiscoverMicrosoft.php ++++ b/lib/AutodiscoverMicrosoft.php +@@ -42,13 +42,6 @@ class AutodiscoverMicrosoft extends Autodiscover + { + $post = $_SERVER['REQUEST_METHOD'] == 'POST' ? file_get_contents('php://input') : null; + +- // check for basic authentication +- Log::debug('Request [microsoft]: Basic Auth Username: ' . ($_SERVER['PHP_AUTH_USER'] ?: 'none')); +- if (empty($_SERVER['PHP_AUTH_USER']) || empty($_SERVER['PHP_AUTH_PW'])) { +- $this->unauthorized(); +- } +- $this->password = $_SERVER['PHP_AUTH_PW']; +- + // check for request object + Log::debug('Request [microsoft]: ' . $post); + if (empty($post)) { +@@ -82,9 +75,19 @@ class AutodiscoverMicrosoft extends Autodiscover + $this->error("Invalid input"); + } + +- // basic auth username must match with given email address +- if ($_SERVER['PHP_AUTH_USER'] != $this->email) { +- $this->unauthorized(); ++ // check for basic authentication if ldap is available ++ if (!empty($this->_ldap_server)) { ++ Log::debug('Request [microsoft]: Basic Auth Username: ' . ($_SERVER['PHP_AUTH_USER'] ?: 'none')); ++ if (empty($_SERVER['PHP_AUTH_USER']) || empty($_SERVER['PHP_AUTH_PW'])) { ++ $this->unauthorized(); ++ } ++ ++ // basic auth username must match with given email address ++ if ($_SERVER['PHP_AUTH_USER'] != $this->email) { ++ $this->unauthorized(); ++ } ++ ++ $this->password = $_SERVER['PHP_AUTH_PW']; + } + } + +@@ -93,9 +96,11 @@ class AutodiscoverMicrosoft extends Autodiscover + */ + public function handle_response() + { +- // authenticate the user found during configure() against ldap +- if (empty($this->config['dn']) || !$this->authenticate($this->config['dn'], $this->password)) { +- $this->unauthorized(); ++ if (!empty($this->_ldap_server)) { ++ // authenticate the user found during configure() against ldap ++ if (empty($this->config['dn']) || !$this->authenticate($this->config['dn'], $this->password)) { ++ $this->unauthorized(); ++ } + } + + $method = $this->type . '_response'; +-- +2.23.0 +
View file
debian.changelog
Changed
@@ -1,3 +1,9 @@ +kolab-autoconf (1.3.2-3) unstable; urgency=medium + + * Allow without LDAP authentication + + -- Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> Tue, 26 May 2020 16:24:02 +0100 + kolab-autoconf (1.3.2-2) unstable; urgency=medium * Release of version 1.3.2
View file
debian.series
Changed
@@ -0,0 +1,1 @@ +0001-Only-authenticate-against-ldap-if-ldap-is-available.patch -p1
View file
kolab-autoconf.dsc
Changed
@@ -2,7 +2,7 @@ Source: kolab-autoconf Binary: kolab-autoconf Architecture: all -Version: 1.3.2-2 +Version: 1.3.2-3 Maintainer: Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> Uploaders: Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> Homepage: http://www.kolab.org/
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
.