Kaydet (Commit) 76772c80 authored tarafından Vasily Melenchuk's avatar Vasily Melenchuk Kaydeden (comit) Thorsten Behrens

cmis: allow http authentication even when password is empty

Test environment for CMIS server using Apache Chemistry and by
default it has just username without password for authentication.
But libcmis uses authentication only if both username and password
are given.

Corresponding patch is already applied to libcmis master.

Using default patch level 1 for libcmis patches, updated existing patches.

Change-Id: Id77b59324002e47258b6315d7383496fa1e9c6ae
Reviewed-on: https://gerrit.libreoffice.org/17070Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarThorsten Behrens <Thorsten.Behrens@CIB.de>
üst fdd391f5
......@@ -11,11 +11,12 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,cmis))
$(eval $(call gb_UnpackedTarball_set_tarball,cmis,$(CMIS_TARBALL)))
$(eval $(call gb_UnpackedTarball_set_patchlevel,cmis,0))
$(eval $(call gb_UnpackedTarball_set_patchlevel,cmis,1))
$(eval $(call gb_UnpackedTarball_add_patches,cmis, \
external/libcmis/libcmis-libxml2_compatibility.patch \
external/libcmis/tdf90351.patch \
external/libcmis/http_auth.patch \
))
ifeq ($(OS)$(COM),WNTMSC)
......
diff --git src/libcmis/atom-object.cxx src/libcmis/atom-object.cxx
index ce21384..eef8102 100644
--- src/libcmis/atom-object.cxx
+++ src/libcmis/atom-object.cxx
--- a/src/libcmis/atom-object.cxx
+++ b/src/libcmis/atom-object.cxx
@@ -30,6 +30,9 @@
#include <locale>
#include <sstream>
......@@ -14,8 +14,8 @@ index ce21384..eef8102 100644
#include "atom-document.hxx"
diff --git src/libcmis/object.hxx src/libcmis/object.hxx
index 449bb22..c320f06 100644
--- src/libcmis/object.hxx
+++ src/libcmis/object.hxx
--- a/src/libcmis/object.hxx
+++ b/src/libcmis/object.hxx
@@ -36,6 +36,9 @@
#include <stdbool.h>
#endif
......@@ -28,8 +28,8 @@ index 449bb22..c320f06 100644
#include <libxml/tree.h>
diff --git src/libcmis/property-type.hxx src/libcmis/property-type.hxx
index 1a8bee9..6ac946c 100644
--- src/libcmis/property-type.hxx
+++ src/libcmis/property-type.hxx
--- a/src/libcmis/property-type.hxx
+++ b/src/libcmis/property-type.hxx
@@ -28,6 +28,9 @@
#ifndef _PROPERTY_TYPE_HXX_
#define _PROPERTY_TYPE_HXX_
......@@ -42,8 +42,8 @@ index 1a8bee9..6ac946c 100644
diff --git src/libcmis/property.hxx src/libcmis/property.hxx
index f9be04a..2977fb3 100644
--- src/libcmis/property.hxx
+++ src/libcmis/property.hxx
--- a/src/libcmis/property.hxx
+++ b/src/libcmis/property.hxx
@@ -31,6 +31,9 @@
#include <libxml/tree.h>
#include <libxml/xmlwriter.h>
......@@ -56,8 +56,8 @@ index f9be04a..2977fb3 100644
diff --git src/libcmis/ws-session.cxx src/libcmis/ws-session.cxx
index b906a5a..bf50644 100644
--- src/libcmis/ws-session.cxx
+++ src/libcmis/ws-session.cxx
--- a/src/libcmis/ws-session.cxx
+++ b/src/libcmis/ws-session.cxx
@@ -28,6 +28,9 @@
#include <sstream>
......@@ -70,8 +70,8 @@ index b906a5a..bf50644 100644
#include <libxml/tree.h>
diff --git src/libcmis/xml-utils.hxx src/libcmis/xml-utils.hxx
index 52853e2..2f80b91 100644
--- src/libcmis/xml-utils.hxx
+++ src/libcmis/xml-utils.hxx
--- a/src/libcmis/xml-utils.hxx
+++ b/src/libcmis/xml-utils.hxx
@@ -33,6 +33,9 @@
#include <sstream>
#include <string>
......
From eca14219ea6f63ae10630ee5b4e246eb77db3ccd Mon Sep 17 00:00:00 2001
From: Vasily Melenchuk <vasily.melenchuk@cib.de>
Date: Wed, 15 Jul 2015 11:54:52 +0200
Subject: [PATCH] do not require password to be not empty to use http
authentication credentials
---
src/libcmis/http-session.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libcmis/http-session.cxx b/src/libcmis/http-session.cxx
index 49ff258..d3122ea 100644
--- a/src/libcmis/http-session.cxx
+++ b/src/libcmis/http-session.cxx
@@ -522,7 +522,7 @@ void HttpSession::httpRunRequest( string url, vector< string > headers, bool red
headers_slist = curl_slist_append( headers_slist,
m_oauth2Handler->getHttpHeader( ).c_str( ) );
}
- else if ( !getUsername().empty() && !getPassword().empty() )
+ else if ( !getUsername().empty() )
{
curl_easy_setopt( m_curlHandle, CURLOPT_HTTPAUTH, m_authMethod );
#if LIBCURL_VERSION_VALUE >= 0x071301
--
1.9.5.msysgit.0
# -*- Mode: Diff -*-
--- src/libcmis/oauth2-providers.cxx
+++ src/libcmis/oauth2-providers.cxx
--- a/src/libcmis/oauth2-providers.cxx
+++ b/src/libcmis/oauth2-providers.cxx
@@ -34,6 +34,10 @@
using namespace std;
......
......@@ -14,8 +14,8 @@ response to tell us.
diff --git a/src/libcmis/atom-document.cxx b/src/libcmis/atom-document.cxx
index b7f28b3..49cfd45 100644
--- src/libcmis/atom-document.cxx
+++ src/libcmis/atom-document.cxx
--- a/src/libcmis/atom-document.cxx
+++ b/src/libcmis/atom-document.cxx
@@ -280,7 +280,7 @@ libcmis::DocumentPtr AtomDocument::checkOut( ) throw ( libcmis::Exception )
if ( NULL == doc )
throw libcmis::Exception( "Failed to parse object infos" );
......@@ -36,8 +36,8 @@ index b7f28b3..49cfd45 100644
refreshImpl( doc );
diff --git a/src/libcmis/atom-folder.cxx b/src/libcmis/atom-folder.cxx
index 7947883..55ac2a9 100644
--- src/libcmis/atom-folder.cxx
+++ src/libcmis/atom-folder.cxx
--- a/src/libcmis/atom-folder.cxx
+++ b/src/libcmis/atom-folder.cxx
@@ -170,7 +170,7 @@ libcmis::FolderPtr AtomFolder::createFolder( const PropertyPtrMap& properties )
if ( NULL == doc )
throw libcmis::Exception( "Failed to parse object infos" );
......@@ -58,8 +58,8 @@ index 7947883..55ac2a9 100644
libcmis::DocumentPtr newDocument = boost::dynamic_pointer_cast< libcmis::Document >( created );
diff --git a/src/libcmis/atom-session.cxx b/src/libcmis/atom-session.cxx
index ffa93a7..e470884 100644
--- src/libcmis/atom-session.cxx
+++ src/libcmis/atom-session.cxx
--- a/src/libcmis/atom-session.cxx
+++ b/src/libcmis/atom-session.cxx
@@ -201,7 +201,7 @@ bool AtomPubSession::setRepository( string repositoryId )
return found;
}
......@@ -85,8 +85,8 @@ index ffa93a7..e470884 100644
}
diff --git a/src/libcmis/atom-session.hxx b/src/libcmis/atom-session.hxx
index c887b6d..953aa17 100644
--- src/libcmis/atom-session.hxx
+++ src/libcmis/atom-session.hxx
--- a/src/libcmis/atom-session.hxx
+++ b/src/libcmis/atom-session.hxx
@@ -37,6 +37,7 @@ class AtomPubSession : public BaseSession
AtomRepositoryPtr m_repository;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment