Ver código fonte

Merge pull request #8691 from garonsky/HPCC-15589_fix_ambiguos_xpath_in_auth

HPCC-15589 ConfigMgr -  Fix ambiguous xpath in EspBindings

Reviewed-By: Rodrigo Pastrana <rodrigo.pastrana@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 9 anos atrás
pai
commit
90a3018cc6

+ 7 - 1
esp/services/WsDeploy/WsDeployService.cpp

@@ -4665,7 +4665,13 @@ bool CWsDeployFileInfo::handleEspServiceBindings(IEspContext &context, IEspHandl
         if (resource)
           xpath.appendf("[@resource='%s']", resource);
 
-        IPropertyTree* pSubType = pEnvRoot->queryPropTree(xpath.str());
+        IPropertyTree* pSubType = nullptr;
+        Owned<IPropertyTreeIterator> iterSubType = pEnvRoot->getElements(xpath.str());
+        ForEach(*iterSubType)
+        {
+             pSubType = &(iterSubType->query());
+             break;
+        }
 
         String subType(xpath.str());
 

+ 1 - 2
esp/xslt/ui_configmgr.xslt

@@ -696,8 +696,7 @@
                                   subi.<xsl:value-of select="name()"/>_required = aS.required;
                                   subi.<xsl:value-of select="name()"/>_onChange = aS.onChange;
                                   subi.<xsl:value-of select="name()"/>_onChangeMsg = aS.onChangeMsg;
-                                  if ("<xsl:value-of select="."/>"!== "")
-                                    subsubTypeKey += "[@" + "<xsl:value-of select="name()"/>" + "='" + "<xsl:value-of select="."/>" + "']";
+                                  subsubTypeKey += "[@" + "<xsl:value-of select="name()"/>" + "='" + "<xsl:value-of select="."/>" + "']";
                                   if (aS.caption)
                                     subi.<xsl:value-of select="name()"/>_caption = aS.caption;
                                 }