summaryrefslogtreecommitdiff
path: root/dev-cpp/libcmis/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-02-20 15:11:50 +0000
committerV3n3RiX <venerix@redcorelinux.org>2019-02-20 15:11:50 +0000
commit16449a80e28af2209916cc66d19c9a44ca2b90d9 (patch)
treeb4cfe2332c7a6c5da27b6985bf05db4508df1a92 /dev-cpp/libcmis/files
parent79599515788b85b18aa655e7b7f8cc05c1bbddd8 (diff)
gentoo resync : 20.02.2019
Diffstat (limited to 'dev-cpp/libcmis/files')
-rw-r--r--dev-cpp/libcmis/files/libcmis-0.5.2-boost-1.68.patch25
-rw-r--r--dev-cpp/libcmis/files/libcmis-0.5.2-fix-gdrive-2fa.patch70
-rw-r--r--dev-cpp/libcmis/files/libcmis-0.5.2-oauth2-encode.patch69
3 files changed, 0 insertions, 164 deletions
diff --git a/dev-cpp/libcmis/files/libcmis-0.5.2-boost-1.68.patch b/dev-cpp/libcmis/files/libcmis-0.5.2-boost-1.68.patch
deleted file mode 100644
index 767464242f78..000000000000
--- a/dev-cpp/libcmis/files/libcmis-0.5.2-boost-1.68.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 3ef3569c4ae1c5319aff0664d52cbd8a8d42c909 Mon Sep 17 00:00:00 2001
-From: rezso <rezso@rezso.net>
-Date: Tue, 4 Sep 2018 01:18:10 +0200
-Subject: tdf#119344 fix libcmis build with boost 1.68
-
-Change-Id: I80d6ea8ecd001dc02b941c1eb8974c9244316045
-Reviewed-on: https://gerrit.libreoffice.org/59958
-Tested-by: Jenkins
-Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
-
---- a/src/libcmis/xml-utils.cxx
-+++ b/src/libcmis/xml-utils.cxx
-@@ -31,7 +31,12 @@
- #include <sstream>
- #include <stdlib.h>
-
-+#include <boost/version.hpp>
-+#if (BOOST_VERSION >= 106800)
-+#include <boost/uuid/detail/sha1.hpp>
-+#else
- #include <boost/uuid/sha1.hpp>
-+#endif
- #include <curl/curl.h>
-
- #include "xml-utils.hxx"
diff --git a/dev-cpp/libcmis/files/libcmis-0.5.2-fix-gdrive-2fa.patch b/dev-cpp/libcmis/files/libcmis-0.5.2-fix-gdrive-2fa.patch
deleted file mode 100644
index 3c19e99a5ba9..000000000000
--- a/dev-cpp/libcmis/files/libcmis-0.5.2-fix-gdrive-2fa.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From 1effce6d286ba3a9f467e15074b532d2ba4b7c98 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Szymon=20K=C5=82os?= <eszkadev@gmail.com>
-Date: Wed, 29 Mar 2017 17:45:10 +0200
-Subject: [PATCH] Fix 2FA for Google Drive
-
----
- src/libcmis/oauth2-providers.cxx | 15 +++++++++++++--
- 1 file changed, 13 insertions(+), 2 deletions(-)
-
-diff --git a/src/libcmis/oauth2-providers.cxx b/src/libcmis/oauth2-providers.cxx
-index 74c0fec..dd872dd 100644
---- a/src/libcmis/oauth2-providers.cxx
-+++ b/src/libcmis/oauth2-providers.cxx
-@@ -37,6 +37,7 @@
- #define CHALLENGE_PAGE_ACTION_LEN sizeof( CHALLENGE_PAGE_ACTION ) - 1
- #define PIN_FORM_ACTION "/signin/challenge/ipp"
- #define PIN_FORM_ACTION_LEN sizeof( PIN_FORM_ACTION ) - 1
-+#define PIN_INPUT_NAME "Pin"
-
- using namespace std;
-
-@@ -152,7 +153,7 @@ string OAuth2Providers::OAuth2Gdrive( HttpSession* session, const string& authUr
- }
-
- loginChallengeLink = "https://accounts.google.com" + loginChallengeLink;
-- loginChallengePost += "Pin=";
-+ loginChallengePost += string( PIN_INPUT_NAME ) + "=";
- loginChallengePost += string( pin );
-
- istringstream loginChallengeIs( loginChallengePost );
-@@ -291,6 +292,8 @@ int OAuth2Providers::parseResponse ( const char* response, string& post, string&
- if ( reader == NULL ) return 0;
-
- bool readInputField = false;
-+ bool bIsRightForm = false;
-+ bool bHasPinField = false;
-
- while ( true )
- {
-@@ -301,6 +304,12 @@ int OAuth2Providers::parseResponse ( const char* response, string& post, string&
- // Find the redirect link
- if ( xmlStrEqual( nodeName, BAD_CAST( "form" ) ) )
- {
-+ // 2FA: Don't add fields form other forms not having pin field
-+ if ( bIsRightForm && !bHasPinField )
-+ post = string( "" );
-+ if ( bIsRightForm && bHasPinField )
-+ break;
-+
- xmlChar* action = xmlTextReaderGetAttribute( reader,
- BAD_CAST( "action" ));
-
-@@ -311,7 +320,7 @@ int OAuth2Providers::parseResponse ( const char* response, string& post, string&
- bool bChallengePage = ( strncmp( (char*)action,
- CHALLENGE_PAGE_ACTION,
- CHALLENGE_PAGE_ACTION_LEN ) == 0 );
-- bool bIsRightForm = ( strncmp( (char*)action,
-+ bIsRightForm = ( strncmp( (char*)action,
- PIN_FORM_ACTION,
- PIN_FORM_ACTION_LEN ) == 0 );
- if ( ( xmlStrlen( action ) > 0 )
-@@ -332,6 +341,8 @@ int OAuth2Providers::parseResponse ( const char* response, string& post, string&
- BAD_CAST( "name" ));
- xmlChar* value = xmlTextReaderGetAttribute( reader,
- BAD_CAST( "value" ));
-+ if ( name != NULL && strcmp( (char*)name, PIN_INPUT_NAME ) == 0 )
-+ bHasPinField = true;
- if ( ( name != NULL ) && ( value!= NULL ) )
- {
- if ( ( xmlStrlen( name ) > 0) && ( xmlStrlen( value ) > 0) )
diff --git a/dev-cpp/libcmis/files/libcmis-0.5.2-oauth2-encode.patch b/dev-cpp/libcmis/files/libcmis-0.5.2-oauth2-encode.patch
deleted file mode 100644
index c6a99074c502..000000000000
--- a/dev-cpp/libcmis/files/libcmis-0.5.2-oauth2-encode.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From 33f7485dedea90e0f80c6348fa8ac5f27c5052e0 Mon Sep 17 00:00:00 2001
-From: Stephan Bergmann <sbergman@redhat.com>
-Date: Tue, 4 Sep 2018 16:45:00 +0200
-Subject: Properly encode OAuth2 credentials
-
-Change-Id: Ic3edeae035262309e91fb01e3aca5c2f905bc3e5
-Reviewed-on: https://gerrit.libreoffice.org/59986
-Tested-by: Jenkins
-Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-
---- a/src/libcmis/oauth2-providers.cxx
-+++ b/src/libcmis/oauth2-providers.cxx
-@@ -26,6 +26,8 @@
- * instead of those above.
- */
-
-+#include <cassert>
-+
- #include <libxml/HTMLparser.h>
- #include <libxml/xmlreader.h>
-
-@@ -45,6 +47,29 @@
- #define HTML_PARSE_RECOVER 0
- #endif
-
-+namespace {
-+
-+// See <https://url.spec.whatwg.org/#concept-urlencoded-byte-serializer>:
-+void addXWwwFormUrlencoded(std::string * buffer, std::string const & data) {
-+ assert(buffer);
-+ for (string::const_iterator i = data.begin(); i != data.end(); ++i) {
-+ unsigned char c = static_cast<unsigned char>(*i);
-+ if (c == ' ' || c == '*' || c == '-' || c == '.' || (c >= '0' && c <= '9')
-+ || (c >= 'A' && c <= 'Z') || c == '_' || (c >= 'a' && c <= 'z'))
-+ {
-+ *buffer += static_cast<char>(c);
-+ } else {
-+ static const char hex[16] = {
-+ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
-+ *buffer += '%';
-+ *buffer += hex[c >> 4];
-+ *buffer += hex[c & 0xF];
-+ }
-+ }
-+}
-+
-+}
-+
- string OAuth2Providers::OAuth2Gdrive( HttpSession* session, const string& authUrl,
- const string& username, const string& password )
- {
-@@ -97,7 +120,7 @@
- return string( );
-
- loginEmailPost += "Email=";
-- loginEmailPost += string( username );
-+ addXWwwFormUrlencoded(&loginEmailPost, username);
-
- istringstream loginEmailIs( loginEmailPost );
- string loginEmailRes;
-@@ -119,7 +142,7 @@
- return string( );
-
- loginPasswdPost += "Passwd=";
-- loginPasswdPost += string( password );
-+ addXWwwFormUrlencoded(&loginPasswdPost, password);
-
- istringstream loginPasswdIs( loginPasswdPost );
- string loginPasswdRes;