VirtualBox

Changeset 6349

Show
Ignore:
Timestamp:
01/14/08 13:42:42 (11 months ago)
Author:
vboxsync
Message:

2332: Registration feature:

1. Check for the handshake (auth) key correctness added.
2. Restriction for the http-request length removed.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/VBox/Frontends/VirtualBox/src/HappyHttp.cpp

    r5999 r6349  
    399399    m_State = REQ_STARTED; 
    400400 
    401     char req[ 512 ]; 
    402     sprintf( req, "%s %s HTTP/1.1", method, url ); 
    403     m_Buffer.push_back( req ); 
     401    m_Buffer.push_back (string (method) + " " + string (url) + " HTTP/1.1"); 
    404402 
    405403    putheader( "Host", m_Host.c_str() );    // required for HTTP1.1 
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxRegistrationDlg.ui.h

    r5999 r6349  
    361361    if (mHandshake) 
    362362    { 
     363        /* Verifying key correctness */ 
     364        if (QString (aTotalData).find (QRegExp ("^[a-zA-Z0-9]{32}$"))) 
     365        { 
     366            abortRegisterRequest (tr ("Could not perform connection handshake.")); 
     367            return; 
     368        } 
     369 
    363370        /* Registration arguments initializing */ 
    364371        QString version = vboxGlobal().virtualBox().GetVersion(); 

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy