[cpp-sp] branch main updated: Dummy up basic auth when no auth type set.
Scott Cantor
cantor.2 at osu.edu
Wed Sep 3 23:57:52 UTC 2025
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch main
in repository cpp-sp.
View the commit online:
http://git.shibboleth.net/view/?p=cpp-sp.git;a=commit;h=10cd1ec5ff7b16c8a76d8e240d5cdcfad27d4306
The following commit(s) were added to refs/heads/main by this push:
new 10cd1ec5 Dummy up basic auth when no auth type set.
10cd1ec5 is described below
commit 10cd1ec5ff7b16c8a76d8e240d5cdcfad27d4306
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed Sep 3 19:57:37 2025 -0400
Dummy up basic auth when no auth type set.
---
shibsp/remoting/impl/CurlHTTPRemotingService.cpp | 7 +++++--
shibsp/remoting/impl/WinHTTPRemotingService.cpp | 10 ++++++++++
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/shibsp/remoting/impl/CurlHTTPRemotingService.cpp b/shibsp/remoting/impl/CurlHTTPRemotingService.cpp
index 871d4433..efd4be0c 100644
--- a/shibsp/remoting/impl/CurlHTTPRemotingService.cpp
+++ b/shibsp/remoting/impl/CurlHTTPRemotingService.cpp
@@ -285,10 +285,10 @@ CURL* CurlHTTPRemotingService::checkout() const
long flag=0;
switch (getAuthMethod()) {
+ case agent_auth_none:
case agent_auth_basic: flag = CURLAUTH_BASIC; break;
case agent_auth_digest: flag = CURLAUTH_DIGEST; break;
case agent_auth_gss: flag = CURLAUTH_NEGOTIATE; break;
- case agent_auth_none:
default: flag = 0; break;
}
SHIB_CURL_SET(CURLOPT_HTTPAUTH, flag);
@@ -355,7 +355,10 @@ void CurlOperation::send(const char* path, istream& in, ostream& out)
}
SHIB_CURL_SET(CURLOPT_URL, url.c_str());
- if (m_service.getAuthMethod() == CurlHTTPRemotingService::agent_auth_basic ||
+ if (m_service.getAuthMethod() == CurlHTTPRemotingService::agent_auth_none) {
+ SHIB_CURL_SET(CURLOPT_PASSWORD, "none");
+ }
+ else if (m_service.getAuthMethod() == CurlHTTPRemotingService::agent_auth_basic ||
m_service.getAuthMethod() == CurlHTTPRemotingService::agent_auth_digest) {
SHIB_CURL_SET(CURLOPT_PASSWORD, m_service.getSecretSource()->getSecret().c_str());
}
diff --git a/shibsp/remoting/impl/WinHTTPRemotingService.cpp b/shibsp/remoting/impl/WinHTTPRemotingService.cpp
index 52286dd0..1d32e91b 100644
--- a/shibsp/remoting/impl/WinHTTPRemotingService.cpp
+++ b/shibsp/remoting/impl/WinHTTPRemotingService.cpp
@@ -403,6 +403,16 @@ void WinHTTPRemotingService::send(const char* path, istream& input, ostream& out
throw RemotingException("Send failed");
}
}
+ else {
+ if (!WinHttpSetCredentials(request,
+ WINHTTP_AUTH_TARGET_SERVER,
+ WINHTTP_AUTH_SCHEME_BASIC,
+ m_username.c_str(),
+ utf8ToUtf16("none").c_str(),
+ nullptr)) {
+ m_log.crit("Send. Failed to setup dummy AuthN to %s : %d", path, GetLastError());
+ throw RemotingException("Send failed");
+ }
wchar_t headers[]= L"Content-Type: text/plain\r\nExpect:";
//
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list