Fix for SSPCPP-87.
authorScott Cantor <cantor.2@osu.edu>
Thu, 27 Mar 2008 01:19:35 +0000 (01:19 +0000)
committerScott Cantor <cantor.2@osu.edu>
Thu, 27 Mar 2008 01:19:35 +0000 (01:19 +0000)
isapi_shib/isapi_shib.cpp

index 1f01f44..4dac1a7 100644 (file)
@@ -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<context_t*>(pfc->pFilterContext)->m_user)
                ((PHTTP_FILTER_LOG)pvNotification)->pszClientUserName=static_cast<context_t*>(pfc->pFilterContext)->m_user;
         return SF_STATUS_REQ_NEXT_NOTIFICATION;
     }