Ignore:
Timestamp:
01/11/13 08:48:41 (11 years ago)
Author:
marcieli
Message:

Ticket #3236 - Correcoes de seguranca com base no segundo relatorio emitido.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/prototype/plugins/icalcreator/iCalcreator.class.php

    r7660 r7730  
    17021702    foreach( $rows as $lix => $line ) { 
    17031703      if(     'BEGIN:VCALENDAR' == strtoupper( substr( $line, 0, 15 ))) { 
    1704         $calsync++; 
     1704          ++$calsync; 
    17051705        continue; 
    17061706      } 
     
    17251725      elseif( 'BEGIN:VFREEBUSY' == strtoupper( substr( $line, 0, 15 ))) { 
    17261726        $comp = new vfreebusy( $config ); 
    1727         $compsync++; 
     1727          ++$compsync; 
    17281728      } 
    17291729      elseif( 'BEGIN:VJOURNAL'  == strtoupper( substr( $line, 0, 14 ))) { 
    17301730        $comp = new vjournal( $config ); 
    1731         $compsync++; 
     1731          ++$compsync; 
    17321732      } 
    17331733      elseif( 'BEGIN:VTODO'     == strtoupper( substr( $line, 0, 11 ))) { 
    17341734        $comp = new vtodo( $config ); 
    1735         $compsync++; 
     1735          ++$compsync; 
    17361736      } 
    17371737      elseif( 'BEGIN:VTIMEZONE' == strtoupper( substr( $line, 0, 15 ))) { 
    17381738        $comp = new vtimezone( $config ); 
    1739         $compsync++; 
     1739          ++$compsync; 
    17401740      } 
    17411741      else { /* update component with unparsed data */ 
     
    17691769          else 
    17701770            $propname .= $char; 
    1771           $cix++; 
     1771            ++$cix; 
    17721772        } 
    17731773            /* skip non standard property names */ 
     
    18141814          else 
    18151815            $attr[$attrix] .= $line[$cix]; 
    1816           $cix++; 
     1816            ++$cix; 
    18171817        } 
    18181818            /* make attributes in array format */ 
     
    18311831          while( FALSE !== substr( $line, $lix, 1 )) { 
    18321832            if(( 0 < $lix ) && ( ',' == $line[$lix] ) && ( "\\" != $line[( $lix - 1 )])) { 
    1833               $cix++; 
     1833                ++$cix; 
    18341834              $content[$cix] = ''; 
    18351835            } 
    18361836            else 
    18371837              $content[$cix] .= $line[$lix]; 
    1838             $lix++; 
     1838              ++$lix; 
    18391839          } 
    18401840          if( 1 < count( $content )) { 
     
    43724372    $length = 6; 
    43734373    $str    = null; 
    4374     for( $p = 0; $p < $length; $p++ ) 
     4374    for( $p = 0; $p < $length; ++$p ) 
    43754375      $unique .= $base{mt_rand( $start, $end )}; 
    43764376    $this->uid = array( 'params' => null ); 
     
    47894789                } 
    47904790                $content2 .= $content21.$content22; 
    4791                 $bydaycnt++; 
     4791                  ++$bydaycnt; 
    47924792              } 
    47934793              else { 
     
    47974797                else { 
    47984798                  $content22 .= $valuePart; 
    4799                   $bydaycnt++; 
     4799                    ++$bydaycnt; 
    48004800                } 
    48014801                $content2 .= $content21.$content22; 
     
    53665366        $ak = ( is_array( $this->attach )) ? array_keys( $this->attach ) : array(); 
    53675367        while( is_array( $this->attach ) && !isset( $this->attach[$propix] ) && ( 0 < count( $this->attach )) && ( $propix < end( $ak ))) 
    5368           $propix++; 
     5368            ++$propix; 
    53695369        $this->propix[$propName] = $propix; 
    53705370        if( !isset( $this->attach[$propix] )) { unset( $this->propix[$propName] ); return FALSE; } 
     
    53745374        $ak = ( is_array( $this->attendee )) ? array_keys( $this->attendee ) : array(); 
    53755375        while( is_array( $this->attendee ) && !isset( $this->attendee[$propix] ) && ( 0 < count( $this->attendee )) && ( $propix < end( $ak ))) 
    5376           $propix++; 
     5376            ++$propix; 
    53775377        $this->propix[$propName] = $propix; 
    53785378        if( !isset( $this->attendee[$propix] )) { unset( $this->propix[$propName] ); return FALSE; } 
     
    53825382        $ak = ( is_array( $this->categories )) ? array_keys( $this->categories ) : array(); 
    53835383        while( is_array( $this->categories ) && !isset( $this->categories[$propix] ) && ( 0 < count( $this->categories )) && ( $propix < end( $ak ))) 
    5384           $propix++; 
     5384            ++$propix; 
    53855385        $this->propix[$propName] = $propix; 
    53865386        if( !isset( $this->categories[$propix] )) { unset( $this->propix[$propName] ); return FALSE; } 
     
    53935393        $ak = ( is_array( $this->comment )) ? array_keys( $this->comment ) : array(); 
    53945394        while( is_array( $this->comment ) && !isset( $this->comment[$propix] ) && ( 0 < count( $this->comment )) && ( $propix < end( $ak ))) 
    5395           $propix++; 
     5395            ++$propix; 
    53965396        $this->propix[$propName] = $propix; 
    53975397        if( !isset( $this->comment[$propix] )) { unset( $this->propix[$propName] ); return FALSE; } 
     
    54045404        $ak = ( is_array( $this->contact )) ? array_keys( $this->contact ) : array(); 
    54055405        while( is_array( $this->contact ) && !isset( $this->contact[$propix] ) && ( 0 < count( $this->contact )) && ( $propix < end( $ak ))) 
    5406           $propix++; 
     5406            ++$propix; 
    54075407        $this->propix[$propName] = $propix; 
    54085408        if( !isset( $this->contact[$propix] )) { unset( $this->propix[$propName] ); return FALSE; } 
     
    54155415        $ak = ( is_array( $this->description )) ? array_keys( $this->description ) : array(); 
    54165416        while( is_array( $this->description ) && !isset( $this->description[$propix] ) && ( 0 < count( $this->description )) && ( $propix < end( $ak ))) 
    5417           $propix++; 
     5417            ++$propix; 
    54185418        $this->propix[$propName] = $propix; 
    54195419        if( !isset( $this->description[$propix] )) { unset( $this->propix[$propName] ); return FALSE; } 
     
    54445444        $ak = ( is_array( $this->exdate )) ? array_keys( $this->exdate ) : array(); 
    54455445        while( is_array( $this->exdate ) && !isset( $this->exdate[$propix] ) && ( 0 < count( $this->exdate )) && ( $propix < end( $ak ))) 
    5446           $propix++; 
     5446            ++$propix; 
    54475447        $this->propix[$propName] = $propix; 
    54485448        if( !isset( $this->exdate[$propix] )) { unset( $this->propix[$propName] ); return FALSE; } 
     
    54525452        $ak = ( is_array( $this->exrule )) ? array_keys( $this->exrule ) : array(); 
    54535453        while( is_array( $this->exrule ) && !isset( $this->exrule[$propix] ) && ( 0 < count( $this->exrule )) && ( $propix < end( $ak ))) 
    5454           $propix++; 
     5454            ++$propix; 
    54555455        $this->propix[$propName] = $propix; 
    54565456        if( !isset( $this->exrule[$propix] )) { unset( $this->propix[$propName] ); return FALSE; } 
     
    54605460        $ak = ( is_array( $this->freebusy )) ? array_keys( $this->freebusy ) : array(); 
    54615461        while( is_array( $this->freebusy ) && !isset( $this->freebusy[$propix] ) && ( 0 < count( $this->freebusy )) && ( $propix < end( $ak ))) 
    5462           $propix++; 
     5462            ++$propix; 
    54635463        $this->propix[$propName] = $propix; 
    54645464        if( !isset( $this->freebusy[$propix] )) { unset( $this->propix[$propName] ); return FALSE; } 
     
    54865486        $ak = ( is_array( $this->rdate )) ? array_keys( $this->rdate ) : array(); 
    54875487        while( is_array( $this->rdate ) && !isset( $this->rdate[$propix] ) && ( 0 < count( $this->rdate )) && ( $propix < end( $ak ))) 
    5488           $propix++; 
     5488            ++$propix; 
    54895489        $this->propix[$propName] = $propix; 
    54905490        if( !isset( $this->rdate[$propix] )) { unset( $this->propix[$propName] ); return FALSE; } 
     
    54975497        $ak = ( is_array( $this->relatedto )) ? array_keys( $this->relatedto ) : array(); 
    54985498        while( is_array( $this->relatedto ) && !isset( $this->relatedto[$propix] ) && ( 0 < count( $this->relatedto )) && ( $propix < end( $ak ))) 
    5499           $propix++; 
     5499            ++$propix; 
    55005500        $this->propix[$propName] = $propix; 
    55015501        if( !isset( $this->relatedto[$propix] )) { unset( $this->propix[$propName] ); return FALSE; } 
     
    55085508        $ak = ( is_array( $this->requeststatus )) ? array_keys( $this->requeststatus ) : array(); 
    55095509        while( is_array( $this->requeststatus ) && !isset( $this->requeststatus[$propix] ) && ( 0 < count( $this->requeststatus )) && ( $propix < end( $ak ))) 
    5510           $propix++; 
     5510            ++$propix; 
    55115511        $this->propix[$propName] = $propix; 
    55125512        if( !isset( $this->requeststatus[$propix] )) { unset( $this->propix[$propName] ); return FALSE; } 
     
    55165516        $ak = ( is_array( $this->resources )) ? array_keys( $this->resources ) : array(); 
    55175517        while( is_array( $this->resources ) && !isset( $this->resources[$propix] ) && ( 0 < count( $this->resources )) && ( $propix < end( $ak ))) 
    5518           $propix++; 
     5518            ++$propix; 
    55195519        $this->propix[$propName] = $propix; 
    55205520        if( !isset( $this->resources[$propix] )) { unset( $this->propix[$propName] ); return FALSE; } 
     
    55245524        $ak = ( is_array( $this->rrule )) ? array_keys( $this->rrule ) : array(); 
    55255525        while( is_array( $this->rrule ) && !isset( $this->rrule[$propix] ) && ( 0 < count( $this->rrule )) && ( $propix < end( $ak ))) 
    5526           $propix++; 
     5526            ++$propix; 
    55275527        $this->propix[$propName] = $propix; 
    55285528        if( !isset( $this->rrule[$propix] )) { unset( $this->propix[$propName] ); return FALSE; } 
     
    56765676      return FALSE; 
    56775677    $arglist[0] = strtoupper( $arglist[0] ); 
    5678     for( $argix=$numargs; $argix < 12; $argix++ ) { 
     5678    for( $argix=$numargs; $argix < 12; ++$argix ) { 
    56795679      if( !isset( $arglist[$argix] )) 
    56805680        $arglist[$argix] = null; 
     
    58305830      elseif( 'BEGIN:VALARM'   == strtoupper( substr( $line, 0, 12 ))) { 
    58315831        $comp = new valarm( $config); 
    5832         $subsync++; 
     5832          ++$subsync; 
    58335833      } 
    58345834      elseif( 'BEGIN:STANDARD' == strtoupper( substr( $line, 0, 14 ))) { 
    58355835        $comp = new vtimezone( 'standard', $config ); 
    5836         $subsync++; 
     5836          ++$subsync; 
    58375837      } 
    58385838      elseif( 'BEGIN:DAYLIGHT' == strtoupper( substr( $line, 0, 14 ))) { 
    58395839        $comp = new vtimezone( 'daylight', $config ); 
    5840         $subsync++; 
     5840          ++$subsync; 
    58415841      } 
    58425842      elseif( 'BEGIN:'         == strtoupper( substr( $line, 0, 6 )))  // begin:<component> 
    5843         $compsync++; 
     5843          ++$compsync; 
    58445844      else 
    58455845        $comp->unparsed[]       = $line; 
     
    59185918            break; 
    59195919          } 
    5920           $cix++; 
     5920            ++$cix; 
    59215921        } 
    59225922        if( '"' == $line[$cix] ) 
     
    59265926        else 
    59275927          $attr[$attrix] .= $line[$cix]; 
    5928         $cix++; 
     5928          ++$cix; 
    59295929      } 
    59305930            /* make attributes in array format */ 
     
    59595959            while( FALSE !== substr( $line, $lix, 1 )) { 
    59605960              if(( ',' == $line[$lix] ) && ( "\\" != $line[( $lix - 1 )])) { 
    5961                 $cix++; 
     5961                  ++$cix; 
    59625962                $content[$cix] = ''; 
    59635963              } 
    59645964              else 
    59655965                $content[$cix] .= $line[$lix]; 
    5966               $lix++; 
     5966                ++$lix; 
    59675967            } 
    59685968            if( 1 < count( $content )) { 
     
    61596159          return TRUE; 
    61606160        } 
    6161         $cix2dC++; 
     6161          ++$cix2dC; 
    61626162      } 
    61636163      elseif( !$argType && ($arg1 == $component->getProperty( 'uid' ))) { 
     
    62106210         if( $index == $cix2gC ) 
    62116211           return $component->copy(); 
    6212          $cix2gC++; 
     6212          ++$cix2gC; 
    62136213      } 
    62146214      elseif( !$argType && ( $arg1 == $component->getProperty( 'uid' ))) 
     
    63036303          return TRUE; 
    63046304        } 
    6305         $cix2sC++; 
     6305          ++$cix2sC; 
    63066306      } 
    63076307      elseif( !$argType && ( $arg1 == $component2->getProperty( 'uid' ))) { // UID insert/replace 
     
    91449144        } 
    91459145        $name[$k]  .= $char; 
    9146         $x++; 
     9146          ++$x; 
    91479147      } 
    91489148    } 
Note: See TracChangeset for help on using the changeset viewer.