cookies garbled by "live support operator" client?

Last post 10-04-2006, 5:35 PM by kenyee. 1 replies.
Sort Posts: Previous Next
  •  09-28-2006, 9:06 AM 23147

    cookies garbled by "live support operator" client?

    I'm implementing integration of live support and seem to be having problems w/ the live support operator client (the one you install from the MSI installer) garbling the cookies.

    In my global.asax SupportLogin() API, the following cookies are set:
    ecm cookie:
    user_id=1&isMembershipUser=0&site_id=/websrc/WorkArea/&userfullname=Application+Administrator&displayname=&username=admin&new_site=/websrc/WorkArea/&unique_id=2099896832&editoroptions=ewebeditpro&site_preview=0&langvalue=&isMembershipUser=0&DefaultLanguage=1033&NavLanguage=1033&SiteLanguage=1033&template=&folderid=&width=790&height=580&FolderPath=&DisplayBorders=1&DisplayTitleText=1&UserCulture=1033&LastValidLanguageID=1033

    EktGUID cookie:
    dc06a2d0-6727-491f-afa7-d10e03dfe88b

    ASP.NET_SessionId cookie:
    5jiwji55ksbii445fgt2nnip

    .ASPXAUTH cookie:
    E74DE98E417C8E6FC2095668DB6D7DC36855B597EC8C1A82FE4B832667EC8C319847960E33F0DFB204F87ADA65819AEBD2934A35146DBF57FB279D83C9F99DBD03D49A9A1C6782981344821F909825F2


    When the live support client calls the global.asax GetUserIdentity() API, the HttpContext.Current.Request.Headers("Cookie") is this:

    ecm=user_id=1&site_id=/websrc/WorkArea/; EktGUID=dc06a2d0-6727-491f-afa7-d10e03dfe88b; .ASPXAUTH=E74DE98E417C8E6FC2095668DB6D7DC36855B597EC8C1A82FE4B832667EC8C319847960E33F0DFB204F87ADA65819AEBD2934A35146DBF57FB279D83C9F99DBD03D49A9A1C6782981344821F909825F2F839481DC039E572798061E34608A21C92B46566A6D0FDA650CB549256980BAC; 2099896832&userfullname=Application+Administrator&displayname=&username=admin&new_site=/websrc/WorkArea/&unique_id=2099896832&editoroptions=ewebeditpro&site_preview=0&langvalue=&isMembershipUser=0&DefaultLanguage=1033&NavLanguage=1033&SiteLanguage=1033&template=&folderid=&width=790&height=580&FolderPath=&DisplayBorders=1&DisplayTitleText=1&UserCulture=1033&LastValidLanguageID=1033; ASP.NET_SessionId=khuxdenbeoirs1n5kzi4dx55

    Note that the ecm cookie has been chopped in half and the other cookies are stuck into the middle of it.  This is the raw cookie HTTP header, so I'm pretty sure it's being sent over by the live support operator client.
    There's no version information on the login screen for the live support operator client, but it's from the 9/25/06 download of live support.  The MSI file is dated 7/30/06.




  •  10-04-2006, 5:35 PM 23353 in reply to 23147

    looks like the live support operator can't deal w/ commas in cookie values

    Here's a global.asax.vb file that will reproduce the problem...not sure why it's splitting cookies using the comma as a separator.  The separator should be a semicolon...



    Imports System.Web
    Imports System.Web.SessionState
    Imports CuteSoft.Chat

        Public Class [Global]
            Inherits System.Web.HttpApplication
            Implements CuteSoft.Chat.IHttpApplicationConnectionStringProvider
            Implements CuteSoft.Chat.IHttpApplicationUserAdapter
            Implements CuteSoft.Chat.IHttpApplicationDataProvider
            Implements CuteSoft.Chat.IHttpApplicationSupportLogin


            Public Function GetConnectionString(ByVal user As CuteSoft.Chat.UserIdentity) As String Implements CuteSoft.Chat.IHttpApplicationConnectionStringProvider.GetConnectionString
                Return System.Configuration.ConfigurationManager.AppSettings("ConnectionString")
            End Function

            Public Function GetUserIdentity() As CuteSoft.Chat.UserIdentity Implements CuteSoft.Chat.IHttpApplicationUserAdapter.GetUserIdentity
                Dim id As String = GetUserUniqueName()
                If (id Is Nothing) Then
                    Return CuteSoft.Chat.UserIdentity.CreateNull()
                End If
                Dim identity As CuteSoft.Chat.UserIdentity = New CuteSoft.Chat.UserIdentity(id, Nothing, Context.Request.UserHostAddress)
                Return identity
            End Function

            Public Function GetUserUniqueName() As String Implements CuteSoft.Chat.IHttpApplicationUserAdapter.GetUserUniqueName
                Dim cookies As String
                cookies = HttpContext.Current.Request.Headers("Cookie")
                Dim username As String
                username = HttpContext.Current.Request.Cookies("ecm")("username")
                Return Nothing
            End Function

            Public Function GetUserDisplayName(ByVal useruniquename As String) As String Implements CuteSoft.Chat.IHttpApplicationDataProvider.GetUserDisplayName
                Return Nothing
            End Function

            Public Function IsAdministrator(ByVal useruniquename As String) As Boolean Implements CuteSoft.Chat.IHttpApplicationDataProvider.IsAdministrator
                Return False
            End Function

            Public Function IsLobbyAdmin(ByVal useruniquename As String, ByVal lobby As CuteSoft.Chat.CuteChatLobby) As Boolean Implements CuteSoft.Chat.IHttpApplicationDataProvider.IsLobbyAdmin
                'TODO: get list of admins for each lobby
                Return False
            End Function

            Public Function ListUserUniqueName() As String() Implements CuteSoft.Chat.IHttpApplicationDataProvider.ListUserUniqueName
                Return Nothing
            End Function

            Public Function SearchUserUniqueNameByDisplayName(ByVal userDisplayName As String) As String() Implements CuteSoft.Chat.IHttpApplicationDataProvider.SearchUserUniqueNameByDisplayName
                Return Nothing
            End Function

            Public Sub SupportInit() Implements CuteSoft.Chat.IHttpApplicationSupportLogin.SupportInit

            End Sub

            Public Function SupportLogin(ByVal username As String, ByVal password As String) As Boolean Implements CuteSoft.Chat.IHttpApplicationSupportLogin.SupportLogin
                Dim cookieEktGUID As HttpCookie
                If (Context.Request.Cookies.Get("EktGUID") Is Nothing) Then
                    Dim strGUID As String = System.Guid.NewGuid.ToString
                    cookieEktGUID = New HttpCookie("EktGUID", strGUID)
                    cookieEktGUID.Path = "/"
                    cookieEktGUID.Expires = Now.AddYears(1)
                    Context.Response.Cookies.Add(cookieEktGUID)
                End If

                System.Web.Security.FormsAuthentication.SetAuthCookie(username, False, "/")
                Dim cookEcm As HttpCookie = New HttpCookie("ecm")
                cookEcm.Values("user_id") = 1
                '******* The comma below seems to be parsed incorrectly by the live support operator client! ******
                cookEcm.Values("site_id") = "/websrc/WorkArea/,679240192"
                cookEcm.Values("userfullname") = "Application+Administrator"
                cookEcm.Values("displayname") = ""
                cookEcm.Values("username") = "admin"
                cookEcm.Values("new_site") = "/websrc/WorkArea/"
                cookEcm.Values("unique_id") = 679240192
                cookEcm.Values("editoroptions") = "ewebeditpro"
                cookEcm.Values("site_preview") = 0
                cookEcm.Values("langvalue") = ""
                cookEcm.Values("isMembershipUser") = 0

                cookEcm.Values("DefaultLanguage") = 1033
                cookEcm.Values("NavLanguage") = 1033
                cookEcm.Values("SiteLanguage") = 1033

                cookEcm.Values("template") = ""
                cookEcm.Values("folderid") = ""
                cookEcm.Values("width") = "790"
                cookEcm.Values("height") = "580"
                cookEcm.Values("FolderPath") = ""
                cookEcm.Values("DisplayBorders") = 1
                cookEcm.Values("DisplayTitleText") = 1
                cookEcm.Values("UserCulture") = 1033
                cookEcm.Values("LastValidLanguageID") = 1033
                If (Not Context.Request.Cookies.Get("ecm") Is Nothing) Then
                    Context.Response.Cookies.Remove("ecm")
                End If
                Context.Response.Cookies.Add(cookEcm)
                Return True
            End Function
        End Class



View as RSS news feed in XML