[mapguide-commits] r9347 - in branches/3.1/MgDev: . Oem/ACE/ACE_wrappers/ace Server/src/Services/Feature UnitTest/WebTier/MapAgent/MapAgentForms Web/src/mapviewerjava Web/src/mapviewernet Web/src/mapviewerphp Web/src/viewerfiles

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Sat Mar 3 05:39:59 PST 2018


Author: jng
Date: 2018-03-03 05:39:59 -0800 (Sat, 03 Mar 2018)
New Revision: 9347

Modified:
   branches/3.1/MgDev/
   branches/3.1/MgDev/Oem/ACE/ACE_wrappers/ace/config-win32.h
   branches/3.1/MgDev/Server/src/Services/Feature/ServerDescribeSchema.cpp
   branches/3.1/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/checkwkt.php
   branches/3.1/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/codetowkt.php
   branches/3.1/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/epsgcodetowkt.php
   branches/3.1/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/isvalid.php
   branches/3.1/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/wkttocode.php
   branches/3.1/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/wkttoepsgcode.php
   branches/3.1/MgDev/Web/src/mapviewerjava/selectwithin.jsp
   branches/3.1/MgDev/Web/src/mapviewernet/selectwithin.aspx
   branches/3.1/MgDev/Web/src/mapviewerphp/selectwithin.php
   branches/3.1/MgDev/Web/src/viewerfiles/
   branches/3.1/MgDev/Web/src/viewerfiles/ajaxmappane.templ
   branches/3.1/MgDev/Web/src/viewerfiles/selectwithinui.templ
Log:
Merged revision(s) 9339-9343 from trunk/MgDev:
Merged revision(s) 9135 from sandbox/adsk/3.2o.AIMS:
The open source application MapGuide provides several scripts which don't make sufficient encoding and verification of user input before using them to generate HTML-Code. HTML or script code might be inserted in the website by the hacker. The vulnerabilities can be recognized easily and can be located by automatic tools
........

........
Merged revision(s) 9136-9138 from sandbox/adsk/3.2o.AIMS:
#2764 Select Within returns all features when actually no result should be found

Clear selection if there is no features in the polygon.
........
#2764 Select Within returns all features when actually no result should be found

Update the JSP code.
........
#2764 Select Within returns all features when actually no result should be found

Update the PHP code.
........

........
Merged revision(s) 9139 from sandbox/adsk/3.2o.AIMS:
Currently, zoom selection doesn't work if the select panel is invisible. It is because the selection bounds is calculated only when selection panel is visible. Now remove this limit to make zoom selection work at all time.
........

........
Merged revision(s) 9140 from sandbox/adsk/3.2o.AIMS:
Ignore abstract classes when DescribeSchema because they should not be visible to consumer.
........

........
Merged revision(s) 9146 from sandbox/adsk/3.2o.AIMS:
Enable ACE IPv6 support.
........

........


Index: branches/3.1/MgDev
===================================================================
--- branches/3.1/MgDev	2018-03-03 13:34:57 UTC (rev 9346)
+++ branches/3.1/MgDev	2018-03-03 13:39:59 UTC (rev 9347)

Property changes on: branches/3.1/MgDev
___________________________________________________________________
Modified: svn:mergeinfo
## -5,6 +5,7 ##
 /sandbox/adsk/2.6l:8727
 /sandbox/adsk/3.0m:8563,8584,8607,8625,8694-8695
 /sandbox/adsk/3.1n:8871,8895,8901,8912-8913,8921-8922,8942,9019-9020
+/sandbox/adsk/3.2o.AIMS:9135-9140,9146
 /sandbox/jng/convenience_apis:8262-8268,8271-8363
 /sandbox/jng/createruntimemap:7486-7555
 /sandbox/jng/dwftk:8321-8324,8328-8329,8331,8352
## -14,4 +15,4 ##
 /sandbox/jng/tiling:8174-8208
 /sandbox/jng/v30:8212-8227
 /sandbox/rfc94:5099-5163
-/trunk/MgDev:8955-8956,8969,8980-8981,8986,8996,9000,9004-9006,9010,9018-9021,9034,9038,9042,9094,9106-9107,9147
\ No newline at end of property
+/trunk/MgDev:8955-8956,8969,8980-8981,8986,8996,9000,9004-9006,9010,9018-9021,9034,9038,9042,9094,9106-9107,9147,9339-9343
\ No newline at end of property
Modified: branches/3.1/MgDev/Oem/ACE/ACE_wrappers/ace/config-win32.h
===================================================================
--- branches/3.1/MgDev/Oem/ACE/ACE_wrappers/ace/config-win32.h	2018-03-03 13:34:57 UTC (rev 9346)
+++ branches/3.1/MgDev/Oem/ACE/ACE_wrappers/ace/config-win32.h	2018-03-03 13:39:59 UTC (rev 9347)
@@ -19,6 +19,9 @@
 #define ACE_CONFIG_WIN32_H
 #include /**/ "ace/pre.h"
 
+#define ACE_HAS_IPV6
+#define ACE_USES_IPV4_IPV6_MIGRATION
+
 // NOTE: Please do not add anything besides #include's here.  Put other stuff
 //       (definitions, etc.) in the included headers
 

Modified: branches/3.1/MgDev/Server/src/Services/Feature/ServerDescribeSchema.cpp
===================================================================
--- branches/3.1/MgDev/Server/src/Services/Feature/ServerDescribeSchema.cpp	2018-03-03 13:34:57 UTC (rev 9346)
+++ branches/3.1/MgDev/Server/src/Services/Feature/ServerDescribeSchema.cpp	2018-03-03 13:39:59 UTC (rev 9347)
@@ -1,5 +1,5 @@
 //
-//  Copyright (C) 2004-2011 by Autodesk, Inc.
+//  Copyright (C) 2017 by Autodesk, Inc.
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of version 2.1 of the GNU Lesser
@@ -283,8 +283,9 @@
 
                 FdoStringP qname = fc->GetQualifiedName();
                 FdoStringP name = fc->GetName();
+                FdoBoolean isAbstract = fc->GetIsAbstract();
 
-                if (name != NULL && qname != NULL)
+                if (name != NULL && qname != NULL && !isAbstract)
                 {
                     Ptr<MgClassDefinition> classDefinition = MgServerFeatureUtil::GetMgClassDefinition(fc, serialize);
                     classCol->Add(classDefinition);
@@ -564,6 +565,9 @@
 
             }  // Repeat for all extensions
 
+            if (classCol->GetCount() == 0)
+                continue;
+
             // Add the schema to the MgFeatureSchemaCollection
             fsCollection->Add(schema);
 

Modified: branches/3.1/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/checkwkt.php
===================================================================
--- branches/3.1/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/checkwkt.php	2018-03-03 13:34:57 UTC (rev 9346)
+++ branches/3.1/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/checkwkt.php	2018-03-03 13:39:59 UTC (rev 9347)
@@ -29,7 +29,8 @@
     }
 
     echo "<b>OGC WKT:</b><br>";
-    echo "$wkt<br><br>";
+    echo htmlentities(strip_tags($wkt), ENT_NOQUOTES);
+    echo "<br><br>";
     echo "<b>Status:</b><br>";
     echo "$status<br><br>";
 

Modified: branches/3.1/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/codetowkt.php
===================================================================
--- branches/3.1/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/codetowkt.php	2018-03-03 13:34:57 UTC (rev 9346)
+++ branches/3.1/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/codetowkt.php	2018-03-03 13:39:59 UTC (rev 9347)
@@ -31,7 +31,8 @@
     }
 
     echo "<b>Code:</b><br>";
-    echo "$code<br><br>";
+    echo htmlentities(strip_tags($code), ENT_NOQUOTES);
+    echo "<br><br>";
     echo "<b>OGC WKT:</b><br>";
     echo "$wkt<br><br>";
     echo "<b>Status:</b><br>";

Modified: branches/3.1/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/epsgcodetowkt.php
===================================================================
--- branches/3.1/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/epsgcodetowkt.php	2018-03-03 13:34:57 UTC (rev 9346)
+++ branches/3.1/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/epsgcodetowkt.php	2018-03-03 13:39:59 UTC (rev 9347)
@@ -32,7 +32,8 @@
     }
 
     echo "<b>EPSG Code:</b><br>";
-    echo "$code<br><br>";
+    echo htmlentities(strip_tags($code), ENT_NOQUOTES);
+    echo "<br><br>";
     echo "<b>OGC WKT:</b><br>";
     echo "$wkt<br><br>";
     echo "<b>Status:</b><br>";

Modified: branches/3.1/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/isvalid.php
===================================================================
--- branches/3.1/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/isvalid.php	2018-03-03 13:34:57 UTC (rev 9346)
+++ branches/3.1/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/isvalid.php	2018-03-03 13:39:59 UTC (rev 9347)
@@ -36,7 +36,8 @@
     }
 
     echo "<b>OGC WKT:</b><br>";
-    echo "$wkt<br><br>";
+    echo htmlentities(strip_tags($wkt), ENT_NOQUOTES);
+    echo "<br><br>";
     echo "<b>Status:</b><br>";
     echo "$status<br><br>";
 

Modified: branches/3.1/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/wkttocode.php
===================================================================
--- branches/3.1/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/wkttocode.php	2018-03-03 13:34:57 UTC (rev 9346)
+++ branches/3.1/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/wkttocode.php	2018-03-03 13:39:59 UTC (rev 9347)
@@ -31,7 +31,8 @@
     }
 
     echo "<b>OGC WKT:</b><br>";
-    echo "$wkt<br><br>";
+    echo htmlentities(strip_tags($wkt), ENT_NOQUOTES);
+    echo "<br><br>";
     echo "<b>Code:</b><br>";
     echo "$code<br><br>";
     echo "<b>Status:</b><br>";

Modified: branches/3.1/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/wkttoepsgcode.php
===================================================================
--- branches/3.1/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/wkttoepsgcode.php	2018-03-03 13:34:57 UTC (rev 9346)
+++ branches/3.1/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/wkttoepsgcode.php	2018-03-03 13:39:59 UTC (rev 9347)
@@ -31,7 +31,8 @@
     }
 
     echo "<b>OGC WKT:</b><br>";
-    echo "$wkt<br><br>";
+    echo htmlentities(strip_tags($wkt), ENT_NOQUOTES);
+    echo "<br><br>";
     echo "<b>EPSG Code:</b><br>";
     echo "$code<br><br>";
     echo "<b>Status:</b><br>";

Modified: branches/3.1/MgDev/Web/src/mapviewerjava/selectwithin.jsp
===================================================================
--- branches/3.1/MgDev/Web/src/mapviewerjava/selectwithin.jsp	2018-03-03 13:34:57 UTC (rev 9346)
+++ branches/3.1/MgDev/Web/src/mapviewerjava/selectwithin.jsp	2018-03-03 13:39:59 UTC (rev 9347)
@@ -52,6 +52,7 @@
         site.Open(cred);
         MgFeatureService featureSrvc = (MgFeatureService)site.CreateService(MgServiceType.FeatureService);
         MgRenderingService renderingSrvc = (MgRenderingService)site.CreateService(MgServiceType.RenderingService);
+        MgResourceService resourceSrvc = (MgResourceService)site.CreateService(MgServiceType.ResourceService);
 
         //load the map runtime state
         //
@@ -81,8 +82,16 @@
                     if(resultSel != null)
                     {
                         // Return XML
-                        response.addHeader("Content-type", "text/xml");
-                        outStream.write(resultSel.ToXml());
+                        resultSel.Save(resourceSrvc, mapName);
+                        //this needs to be re-opened for some reason
+                        resultSel = new MgSelection(map);
+                        resultSel.Open(resourceSrvc, mapName);
+                        MgReadOnlyLayerCollection resLayers = resultSel.GetLayers();
+                        if (resLayers != null && resLayers.GetCount() >= 0)
+                        {
+                            response.addHeader("Content-type", "text/xml");
+                            outStream.write(resultSel.ToXml());
+                        }
                     }
                 }
             }

Modified: branches/3.1/MgDev/Web/src/mapviewernet/selectwithin.aspx
===================================================================
--- branches/3.1/MgDev/Web/src/mapviewernet/selectwithin.aspx	2018-03-03 13:34:57 UTC (rev 9346)
+++ branches/3.1/MgDev/Web/src/mapviewernet/selectwithin.aspx	2018-03-03 13:39:59 UTC (rev 9347)
@@ -1,5 +1,5 @@
 <%--
-Copyright (C) 2004-2011 by Autodesk, Inc.
+Copyright (C) 2017 by Autodesk, Inc.
 This library is free software; you can redistribute it and/or
 modify it under the terms of version 2.1 of the GNU Lesser
 General Public License as published by the Free Software Foundation.
@@ -50,6 +50,7 @@
         site.Open(cred);
         MgFeatureService featureSrvc = site.CreateService(MgServiceType.FeatureService) as MgFeatureService;
         MgRenderingService renderingSrvc = site.CreateService(MgServiceType.RenderingService) as MgRenderingService;
+        MgResourceService resourceSrvc = site.CreateService(MgServiceType.ResourceService) as MgResourceService;
 
         //load the map runtime state
         //
@@ -79,8 +80,16 @@
                     if(resultSel != null)
                     {
                         // Return XML
-                        Response.AddHeader("Content-type", "text/xml");
-                        Response.Write(resultSel.ToXml());
+                        resultSel.Save(resourceSrvc, mapName);
+                        //this needs to be re-opened for some reason
+                        resultSel = new MgSelection(map);
+                        resultSel.Open(resourceSrvc, mapName);
+                        MgReadOnlyLayerCollection resLayers = resultSel.GetLayers();
+                        if (resLayers != null && resLayers.GetCount() >= 0)
+                        {
+                            Response.AddHeader("Content-type", "text/xml");
+                            Response.Write(resultSel.ToXml());
+                        }
                     }
                 }
             }

Modified: branches/3.1/MgDev/Web/src/mapviewerphp/selectwithin.php
===================================================================
--- branches/3.1/MgDev/Web/src/mapviewerphp/selectwithin.php	2018-03-03 13:34:57 UTC (rev 9346)
+++ branches/3.1/MgDev/Web/src/mapviewerphp/selectwithin.php	2018-03-03 13:39:59 UTC (rev 9347)
@@ -42,6 +42,7 @@
         $site->Open($cred);
         $featureSrvc = $site->CreateService(MgServiceType::FeatureService);
         $renderingSrvc = $site->CreateService(MgServiceType::RenderingService);
+        $resourceSrvc = $site->CreateService(MgServiceType::ResourceService);
 
         //load the map runtime state
         //
@@ -69,9 +70,17 @@
                     $resultSel = $fi->GetSelection();
                     if($resultSel)
                     {
-                        //return XML
-                        header("Content-type: text/xml");
-                        echo $resultSel->ToXml();
+                        // Return XML
+                        $resultSel->Save($resourceSrvc, $mapName);
+                        //this needs to be re-opened for some reason
+                        $resultSel = new MgSelection($map);
+                        $resultSel->Open($resourceSrvc, $mapName);
+                        $resLayers = $resultSel->GetLayers();
+                        if ($resLayers != null && $resLayers->GetCount() >= 0)
+                        {
+                            header("Content-type: text/xml");
+                            echo $resultSel->ToXml();
+                        }
                     }
                 }
             }

Index: branches/3.1/MgDev/Web/src/viewerfiles
===================================================================
--- branches/3.1/MgDev/Web/src/viewerfiles	2018-03-03 13:34:57 UTC (rev 9346)
+++ branches/3.1/MgDev/Web/src/viewerfiles	2018-03-03 13:39:59 UTC (rev 9347)

Property changes on: branches/3.1/MgDev/Web/src/viewerfiles
___________________________________________________________________
Modified: svn:mergeinfo
## -2,6 +2,7 ##
 /branches/2.6/MgDev/Web/src/viewerfiles:8288-8292,8297
 /sandbox/adsk/2.2gp/Web/src/viewerfiles:5392
 /sandbox/adsk/3.0m/Web/src/viewerfiles:8607
+/sandbox/adsk/3.2o.AIMS/Web/src/viewerfiles:9136-9139
 /sandbox/jng/createruntimemap/Web/src/viewerfiles:7486-7555
 /sandbox/jng/v30/Web/src/viewerfiles:8226-8227
-/trunk/MgDev/Web/src/viewerfiles:9034
\ No newline at end of property
+/trunk/MgDev/Web/src/viewerfiles:9034,9339-9343
\ No newline at end of property
Modified: branches/3.1/MgDev/Web/src/viewerfiles/ajaxmappane.templ
===================================================================
--- branches/3.1/MgDev/Web/src/viewerfiles/ajaxmappane.templ	2018-03-03 13:34:57 UTC (rev 9346)
+++ branches/3.1/MgDev/Web/src/viewerfiles/ajaxmappane.templ	2018-03-03 13:39:59 UTC (rev 9347)
@@ -3176,20 +3176,17 @@
     }
     if(which & 2)
     {
-        if (IsPropertyCtrlVisible())
+        if (selection.count > 0)
         {
-            if (selection.count > 0)
-            {
-                //Check if we have attributes inline
-                var props = xmlIn.getElementsByTagName("SelectedLayer");
-                var resp = ConvertToSelectedFeatureSet(props, xmlIn, append);
-                ProcessSelectedFeatureSet(resp, append);
-            }
-            else
-            {
-                ResetPropertyPane();
-            }
+            //Check if we have attributes inline
+            var props = xmlIn.getElementsByTagName("SelectedLayer");
+            var resp = ConvertToSelectedFeatureSet(props, xmlIn, append);
+            ProcessSelectedFeatureSet(resp, append);
         }
+        else
+        {
+            ResetPropertyPane();
+        }
     }
     if(which & 4)
     {

Modified: branches/3.1/MgDev/Web/src/viewerfiles/selectwithinui.templ
===================================================================
--- branches/3.1/MgDev/Web/src/viewerfiles/selectwithinui.templ	2018-03-03 13:34:57 UTC (rev 9346)
+++ branches/3.1/MgDev/Web/src/viewerfiles/selectwithinui.templ	2018-03-03 13:39:59 UTC (rev 9347)
@@ -90,6 +90,8 @@
         reqHandler.send(reqParams);
         if(reqHandler.responseXML)
             GetParent().SetSelectionXML(reqHandler.responseText);
+        else
+            GetParent().GetMapFrame().ClearSelection();
     }
     catch(e) {}
     GetParent().GotoHomePage();



More information about the mapguide-commits mailing list