[cpp-sp] branch main updated: SSPCPP-941 - IIS module mishandles non-ASCII data in server variables
Scott Cantor
cantor.2 at osu.edu
Fri Jul 30 14:10:01 UTC 2021
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=30b64d25213fb8f756ff9c05beae6a9f16badad0
The following commit(s) were added to refs/heads/main by this push:
new 30b64d25 SSPCPP-941 - IIS module mishandles non-ASCII data in server variables
30b64d25 is described below
commit 30b64d25213fb8f756ff9c05beae6a9f16badad0
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Fri Jul 30 10:09:40 2021 -0400
SSPCPP-941 - IIS module mishandles non-ASCII data in server variables
https://issues.shibboleth.net/jira/browse/SSPCPP-941
---
iis7_shib/IIS7Request.cpp | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/iis7_shib/IIS7Request.cpp b/iis7_shib/IIS7Request.cpp
index 9d381591..2f10d9cd 100644
--- a/iis7_shib/IIS7Request.cpp
+++ b/iis7_shib/IIS7Request.cpp
@@ -269,11 +269,12 @@ string IIS7Request::getRemoteAddr() const
string IIS7Request::getSecureHeader(const char* name) const
{
if (m_useVariables) {
- PCSTR p;
+ PCWSTR p;
DWORD len;
HRESULT hr = m_ctx->GetServerVariable(name, &p, &len);
- if (SUCCEEDED(hr)) {
- return (nullptr == p) ? "" : p;
+ if (SUCCEEDED(hr) && p) {
+ std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> converter;
+ return converter.to_bytes(p);
}
return "";
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list