From d4d1334f55c3c704e70eaabbc4669109649c7958 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Fri, 21 Nov 2014 18:48:57 +0100 Subject: [PATCH] [jan] Fix DAV client always using Digest authentication (Bug #13319). --- framework/Dav/lib/Horde/Dav/Client.php | 11 ++++++++--- framework/Dav/package.xml | 2 ++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/framework/Dav/lib/Horde/Dav/Client.php b/framework/Dav/lib/Horde/Dav/Client.php index 068c1540831..95f66a1172d 100644 --- a/framework/Dav/lib/Horde/Dav/Client.php +++ b/framework/Dav/lib/Horde/Dav/Client.php @@ -82,11 +82,16 @@ public function request($method, $url = '', $body = null, $headers = array()) $this->_http->{'request.proxyServer'} = $this->proxy; } if ($this->userName && $this->authType) { - if ($this->authType & self::AUTH_BASIC) { + switch ($this->authType) { + case self::AUTH_BASIC: $this->_http->{'request.authenticationScheme'} = Horde_Http::AUTH_BASIC; - } - if ($this->authType & self::AUTH_DIGEST) { + break; + case self::AUTH_DIGEST: $this->_http->{'request.authenticationScheme'} = Horde_Http::AUTH_DIGEST; + break; + default: + $this->_http->{'request.authenticationScheme'} = Horde_Http::AUTH_ANY; + break; } $this->_http->{'request.username'} = $this->userName; $this->_http->{'request.password'} = $this->password; diff --git a/framework/Dav/package.xml b/framework/Dav/package.xml index d3f1d7b6c5e..01e5109fb7d 100644 --- a/framework/Dav/package.xml +++ b/framework/Dav/package.xml @@ -21,6 +21,7 @@ BSD-2-Clause +* [jan] Fix DAV client always using Digest authentication (Bug #13319). * [jan] Fix PUT request not passing content to the backend. @@ -842,6 +843,7 @@ 2014-10-29 BSD-2-Clause +* [jan] Fix DAV client always using Digest authentication (Bug #13319). * [jan] Fix PUT request not passing content to the backend.