[fusion-trac] #234: Mapguide utility function cause LoadMap to fail

Fusion trac_fusion at osgeo.org
Tue Mar 31 11:48:39 EDT 2009


#234: Mapguide utility function cause LoadMap to fail
---------------------------+------------------------------------------------
   Reporter:  beginbenoit  |       Owner:  madair    
       Type:  defect       |      Status:  new       
   Priority:  P2           |   Milestone:  Future    
  Component:  MapGuide     |     Version:  2.0 - beta
   Severity:  Major        |    Keywords:            
External_id:               |       State:  New       
    Browser:  All          |          Os:  All       
---------------------------+------------------------------------------------
 In fusion\layers\MapGuide\php\Utility.php, the function ByteReaderToString
 will cause LoadMap.php calls to unexpectedly terminate during the building
 of the JSON. The code in its current state likely uses the maximum amount
 of memory available for the process to run and PHP throws an exception
 that I was unfortunately unable to trap. The function should be changed to
 use the built-in ToString function of the MgByteReader.

 {{{
 function ByteReaderToString($byteReader)
 {
     return $byteReader->ToString();
 }
 }}}

 It would be possible to add some validation to prevent any issues, such as
 calling GetMimeType to validate that the ToString will return something
 that is the actual textual representation of the content held in it.

-- 
Ticket URL: <http://trac.osgeo.org/fusion/ticket/234>
Fusion <http://trac.osgeo.org/fusion>
Fusion is a web-mapping application development framework for MapServer and MapGuide OS.


More information about the fusion-trac mailing list