Ignore:
Timestamp:
2010-08-14T23:23:23Z (10 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().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.