mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-04 00:06:46 -05:00
Server: Fix endless loop when processing WFS Transaction document with non-mappable attribute names
This commit is contained in:
parent
cd2944e57f
commit
9f751f232f
@ -803,7 +803,7 @@ namespace QgsWfs
|
||||
QDomNode currentAttributeChild = featureElem.firstChild();
|
||||
bool conversionSuccess = true;
|
||||
|
||||
while ( !currentAttributeChild.isNull() )
|
||||
for (; !currentAttributeChild.isNull(); currentAttributeChild = currentAttributeChild.nextSibling() )
|
||||
{
|
||||
QDomElement currentAttributeElement = currentAttributeChild.toElement();
|
||||
QString attrName = currentAttributeElement.localName();
|
||||
@ -815,6 +815,7 @@ namespace QgsWfs
|
||||
fieldMapIt = fieldMap.find( attrName );
|
||||
if ( fieldMapIt == fieldMap.constEnd() )
|
||||
{
|
||||
QgsMessageLog::logMessage( QStringLiteral( "Skipping unknown attribute: name=%1" ).arg( attrName ) );
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -847,7 +848,6 @@ namespace QgsWfs
|
||||
feat.setGeometry( g );
|
||||
}
|
||||
}
|
||||
currentAttributeChild = currentAttributeChild.nextSibling();
|
||||
}
|
||||
// update feature list
|
||||
featList << feat;
|
||||
|
||||
@ -780,7 +780,7 @@ namespace QgsWfs
|
||||
QDomNode currentAttributeChild = featureElem.firstChild();
|
||||
bool conversionSuccess = true;
|
||||
|
||||
while ( !currentAttributeChild.isNull() )
|
||||
for (; !currentAttributeChild.isNull(); currentAttributeChild = currentAttributeChild.nextSibling() )
|
||||
{
|
||||
QDomElement currentAttributeElement = currentAttributeChild.toElement();
|
||||
QString attrName = currentAttributeElement.localName();
|
||||
@ -792,6 +792,7 @@ namespace QgsWfs
|
||||
fieldMapIt = fieldMap.find( attrName );
|
||||
if ( fieldMapIt == fieldMap.constEnd() )
|
||||
{
|
||||
QgsMessageLog::logMessage( QStringLiteral( "Skipping unknown attribute: name=%1" ).arg( attrName ) );
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -824,7 +825,6 @@ namespace QgsWfs
|
||||
feat.setGeometry( g );
|
||||
}
|
||||
}
|
||||
currentAttributeChild = currentAttributeChild.nextSibling();
|
||||
}
|
||||
// update feature list
|
||||
featList << feat;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user