From f5cdb21145b2a710b5cc304402f9283de8272ffa Mon Sep 17 00:00:00 2001 From: cantor Date: Sun, 30 Mar 2008 18:21:43 +0000 Subject: [PATCH] Branch for 2.0 stream. git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/branches/REL_2_0@2793 cb58f699-b61c-0410-a6fe-9272a202ed29 --- isapi_shib/isapi_shib.cpp | 5 ++--- msi/scripts/shib_edit_config_files.vbs | 6 +++++- shibsp/handler/impl/SAML2SessionInitiator.cpp | 6 ++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/isapi_shib/isapi_shib.cpp b/isapi_shib/isapi_shib.cpp index 1f01f44..4dac1a7 100644 --- a/isapi_shib/isapi_shib.cpp +++ b/isapi_shib/isapi_shib.cpp @@ -563,9 +563,8 @@ DWORD WriteClientError(PHTTP_FILTER_CONTEXT pfc, const char* msg) extern "C" DWORD WINAPI HttpFilterProc(PHTTP_FILTER_CONTEXT pfc, DWORD notificationType, LPVOID pvNotification) { // Is this a log notification? - if (notificationType==SF_NOTIFY_LOG) - { - if (pfc->pFilterContext) + if (notificationType==SF_NOTIFY_LOG) { + if (pfc->pFilterContext && static_cast(pfc->pFilterContext)->m_user) ((PHTTP_FILTER_LOG)pvNotification)->pszClientUserName=static_cast(pfc->pFilterContext)->m_user; return SF_STATUS_REQ_NEXT_NOTIFICATION; } diff --git a/msi/scripts/shib_edit_config_files.vbs b/msi/scripts/shib_edit_config_files.vbs index 1dbcd18..3ce7ad1 100644 --- a/msi/scripts/shib_edit_config_files.vbs +++ b/msi/scripts/shib_edit_config_files.vbs @@ -35,7 +35,7 @@ Sub ReplaceInFile( filePath, lookForStr, replaceWithStr ) End Sub -Dim FileSystemObj, ConvertedDir, ConfigFile, XMLDir +Dim FileSystemObj, ConvertedDir, ConfigFile, XMLDir, WshShell Dim customData, msiProperties, InstallDir, ShibdPort on error resume next @@ -56,6 +56,10 @@ if (Err = 0) then ConfigDir = InstallDir & "\etc\shibboleth\" DistDir = ConfigDir & "dist\" + 'Set ConvertedDir as the SHIBSP_PREFIX system variable. + Set WshShell = CreateObject("WScript.Shell") + WshShell.RegWrite "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\SHIBSP_PREFIX", ConvertedDir, "REG_SZ" + 'Perform actual Substitutions 'Afterwards, if the config file doesn't already exist, copy up to etc/shibboleth 'Also strip *.in for files in dist diff --git a/shibsp/handler/impl/SAML2SessionInitiator.cpp b/shibsp/handler/impl/SAML2SessionInitiator.cpp index 9906907..0454e4d 100644 --- a/shibsp/handler/impl/SAML2SessionInitiator.cpp +++ b/shibsp/handler/impl/SAML2SessionInitiator.cpp @@ -242,11 +242,9 @@ pair SAML2SessionInitiator::run(SPRequest& request, string& entityID, } option = request.getParameter("target"); - if (option) + if (option) { target = option; - if (acsByIndex.first && !acsByIndex.second) { - // Since we're passing the ACS by value, we need to compute the return URL, - // so we'll need the target resource for real. + // Always need to recover target URL to compute handler below. recoverRelayState(request.getApplication(), request, request, target, false); } -- 2.1.4