Changeset 7748 for trunk


Ignore:
Timestamp:
01/15/13 08:29:50 (11 years ago)
Author:
cristiano
Message:

Ticket #3292 - Caracter compromete a visualização de mensagens no ExpressoMail?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/js/connector.js

    r5210 r7748  
    171171        } 
    172172 
    173                  
    174173        //Unserialize Data Method 
    175174        cConnector.prototype.unserialize = function(str) 
     
    182181                        do 
    183182                        { 
    184                                 nOpen = str.indexOf('{', nClose+1); 
    185                                 nClose = str.indexOf('}', nClose+1); 
    186  
    187                                 if (nOpen == -1) 
    188                                 { 
    189                                         return nClose; 
    190                                 } 
    191                                 if (nOpen < nClose ) 
    192                                 { 
    193                                         nClose = matchB(str, nOpen); 
    194                                 } 
     183                nOpen = str.substr(nClose+1).search(/[0-9]\:\{/ ); 
     184 
     185                if (nOpen > 0) 
     186                    nOpen = nOpen + nClose+3; 
     187 
     188                nClose = (str.substr(nClose+1) == '}' || str.substr(nClose+1,1) == '}') ? nClose +1 : str.substr(nClose+1).search(/[0-9\"]\;\}/ ) + nClose + 3; 
     189 
     190                if (nOpen < 0) 
     191                { 
     192                    return nClose; 
     193                } 
     194                if (nOpen < nClose ) 
     195                { 
     196                    nClose = matchB(str, nOpen); 
     197                } 
    195198                        } while (nOpen < nClose); 
    196199 
     
    338341                                                case 200: 
    339342                                                        if (typeof(handler) == 'function') 
    340                                                         {                                                                                                                                
    341                                                                 _thisObject.hideProgressBar();                                                                                                                           
     343                                                        { 
     344                                                                _thisObject.hideProgressBar(); 
    342345                                                                var data = _thisObject.unserialize(oxmlhttp.responseText); 
    343346                                                                if ( typeof data == 'undefined' ) 
    344347                                                                        data = oxmlhttp.responseText; 
    345                                                                 // Verify user session  
    346                                                                 if(data && data.nosession){  
    347                                                                         // If hold session is setted, dont reload the page ...  
    348                                                                         if(hold_session) {  
    349                                                                                 if(typeof(write_msg) == "function" && typeof(get_lang) == "function")  
    350                                                                                         write_msg(get_lang("your session could not be verified."));  
    351                                                                                 else  
    352                                                                                         alert("your session could not be verified.");  
    353                                                                         }  
    354                                                                         else  
    355                                                                                 window.location.reload();  
    356  
    357                                                                         delete _thisObject.requests[id];  
    358                                                                         _thisObject.requests[id] = null;  
    359                                                                         return false;  
    360                                                                 }  
     348                                                                // Verify user session 
     349                                                                if(data && data.nosession){ 
     350                                                                        // If hold session is setted, dont reload the page ... 
     351                                                                        if(hold_session) { 
     352                                                                                if(typeof(write_msg) == "function" && typeof(get_lang) == "function") 
     353                                                                                        write_msg(get_lang("your session could not be verified.")); 
     354                                                                                else 
     355                                                                                        alert("your session could not be verified."); 
     356                                                                        } 
     357                                                                        else 
     358                                                                                window.location.reload(); 
     359 
     360                                                                        delete _thisObject.requests[id]; 
     361                                                                        _thisObject.requests[id] = null; 
     362                                                                        return false; 
     363                                                                } 
    361364                                                                if(debug_controller) { 
    362365                                                                        document.getElementById("debug_controller").innerHTML += oxmlhttp.responseText; 
     
    365368 
    366369                                                                _thisObject.addToCache(params?id+"&"+params:id,data); 
    367                                                                 delete _thisObject.requests[id];                                                                 
     370                                                                delete _thisObject.requests[id]; 
    368371                                                                _thisObject.requests[id] = null; 
    369372                                                                handler(data); 
     
    373376 
    374377                                                case 404: 
    375                                                          
     378 
    376379                                                        alert(get_lang('Page Not Found!')); 
    377380                                                        break; 
    378381 
    379                                                 default:                                                                                                 
     382                                                default: 
    380383                                        } 
    381384                                } 
    382385                        } 
    383386                        catch (e) 
    384                         {                        
     387                        { 
    385388                                _thisObject.hideProgressBar(); 
    386389                                if(debug_controller) 
     
    389392                                throw(e); 
    390393                        } 
    391                                                  
     394 
    392395                } 
    393396 
    394397                try 
    395                 {  
     398                { 
    396399                        if (method == '' || method == 'GET') 
    397400                        {                                                                
     
    417420                } 
    418421                catch(e) 
    419                 {        
     422                { 
    420423                        _thisObject.hideProgressBar(); 
    421424                        if(debug_controller) 
    422425                                alert(e); 
    423                         // View Exception in Javascript Console   
     426                        // View Exception in Javascript Console 
    424427                        throw(e); 
    425428                } 
Note: See TracChangeset for help on using the changeset viewer.