Changeset d97f51b for protocols


Ignore:
Timestamp:
2010-08-14T23:23:23Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
ff27648
Parents:
d912fe4
Message:

Fix issues with logging in with huge SSO tickets (hilariously, the 1024-
byte buffer was just one byte too short, resulting in a \r-terminated
login line and the server waiting for the \n). Also using xt_find_path().

Location:
protocols/msn
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • protocols/msn/msn_util.c

    rd912fe4 rd97f51b  
    6565        strcpy( handle, handle_ );
    6666        if( ( domain = strchr( handle, '@' ) ) )
    67                 *(domain
    68                 ++) = '\0';
     67                *(domain++) = '\0';
    6968        else
    7069                return NULL;
  • protocols/msn/ns.c

    rd912fe4 rd97f51b  
    705705       
    706706        {
    707                 char buf[1024];
     707                char buf[1536];
    708708               
    709709                g_snprintf( buf, sizeof( buf ), "USR %d SSO S %s %s\r\n", ++md->trId, md->tokens[0], token );
  • protocols/msn/soap.c

    rd912fe4 rd97f51b  
    203203        id += strlen( id ) - 1;
    204204        if( *id == '1' &&
    205             ( p = node->parent ) && ( p = p->parent ) &&
    206             ( p = xt_find_node( p->children, "wst:RequestedProofToken" ) ) &&
    207             ( p = xt_find_node( p->children, "wst:BinarySecret" ) ) &&
     205            ( p = xt_find_path( node, "../../wst:RequestedProofToken/wst:BinarySecret" ) ) &&
    208206            p->text )
    209207                sd->secret = g_strdup( p->text );
     
    477475        struct im_connection *ic = soap_req->ic;
    478476       
    479         if( ( p = node->parent ) && ( p = p->parent ) &&
    480             ( p = xt_find_node( p->children, "MemberRole" ) ) )
     477        if( ( p = xt_find_path( node, "../../MemberRole" ) ) )
    481478                role = p->text;
    482479       
     
    636633        struct msn_soap_req_data *soap_req = data;
    637634       
    638         if( ( p = node->parent ) &&
    639             ( p = xt_find_node( p->children, "groupId" ) ) )
     635        if( ( p = xt_find_path( node, "../groupId" ) ) )
    640636                id = p->text;
    641637       
     
    657653        struct im_connection *ic = soap_req->ic;
    658654       
    659         if( ( p = node->parent ) &&
    660             ( p = xt_find_node( p->children, "contactId" ) ) )
     655        if( ( p = xt_find_path( node, "../contactId" ) ) )
    661656                id = p->text;
    662657        if( ( p = xt_find_node( node->children, "contactType" ) ) )
     
    676671        }
    677672       
     673        if( handle == NULL )
     674                return XT_HANDLED;
     675       
    678676        if( !( bu = bee_user_by_handle( ic->bee, ic, handle ) ) &&
    679677            !( bu = bee_user_new( ic->bee, ic, handle, 0 ) ) )
Note: See TracChangeset for help on using the changeset viewer.