svn commit: r1899600 - /nifi/site/trunk/security.html
Author: thenatog Date: Wed Apr 6 03:52:36 2022 New Revision: 1899600 URL: http://svn.apache.org/viewvc?rev=1899600&view=rev Log: NIFI-9780 - Updated security.html page for 1.16.0 release. Modified: nifi/site/trunk/security.html Modified: nifi/site/trunk/security.html URL: http://svn.apache.org/viewvc/nifi/site/trunk/security.html?rev=1899600&r1=1899599&r2=1899600&view=diff == --- nifi/site/trunk/security.html (original) +++ nifi/site/trunk/security.html Wed Apr 6 03:52:36 2022 @@ -162,6 +162,58 @@ +Fixed in Apache NiFi 1.16.0 + + + + + +Vulnerabilities + + + + +CVE-2022-26850: Apache NiFi insufficiently protected credentials +Severity: Medium +Versions Affected: + +Apache NiFi 1.14.0 - 1.15.1 + + +Description: When creating or updating credentials for single-user access, NiFi wrote a copy of the Login Identity Providers configuration to the operating system temporary directory. On most platforms, the operating system temporary directory has global read permissions. NiFi immediately moved the temporary file to the final configuration directory, which significantly limited the window of opportunity for access. +Mitigation: NiFi 1.16.0 includes updates to replace the Login Identity Providers configuration without writing a file to the operating system temporary directory. +Credit: This issue was discovered by Jonathan Leitschuh (https://twitter.com/jlleitschuh). +CVE Link: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-26850"; target="_blank">Mitre Database: CVE-2022-26850 +NiFi Jira: https://issues.apache.org/jira/browse/NIFI-9785"; target="_blank">NIFI-9785 +NiFi PR: https://github.com/apache/nifi/pull/5856"; target="_blank">PR 5856 +Released: March 27, 2022 + + + + + +Dependency Vulnerabilities + + + + +CVE-2021-42392: Apache NiFi's use of H2 database +Severity: Important +Versions Affected: + +Apache NiFi 0.0.1 - 1.15.3 + + +Description: Apache NiFi uses H2 database for storing various NiFi runtime details. H2 database had a critical vulnerability similar to Log4Shell which potentially allows JNDI remote codebase loading. In NiFi, by default, console access to the database is restricted to local machine access only and remote access is disabled which limited the severity of this vulnerability. More detailed information on the H2 vulnerability can be found in https://thesecmaster.com/how-to-fix-cve-2021-42392-a-critical-unauthenticated-rce-in-h2-database-console/";>this blog post. +Mitigation: We have upgraded the H2 version that NiFi uses from 1.4.199 to 2.1.210. The vulnerability is also mitigated with more recent versions of Java (6u211 , 7u201, 8u191, 11.0.1 onwards). +CVE Link: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-42392"; target="_blank">Mitre Database: CVE-2021-42392 +NiFi Jira: https://issues.apache.org/jira/browse/NIFI-9585"; target="_blank">NIFI-9585 +Released: March 27, 2022 + + + + + Fixed in Apache NiFi 1.15.1
[nifi] 06/06: NIFI-7253 Upgraded Jackson to 2.13.2 using jackson-bom
This is an automated email from the ASF dual-hosted git repository. joewitt pushed a commit to branch support/nifi-1.16 in repository https://gitbox.apache.org/repos/asf/nifi.git commit bec94ef4d8d1a36e05e3ecf55c4272822c091fbd Author: Mike Thomsen AuthorDate: Sat Mar 26 10:31:08 2022 -0400 NIFI-7253 Upgraded Jackson to 2.13.2 using jackson-bom This closes #5904 Signed-off-by: David Handermann --- nifi-nar-bundles/nifi-snmp-bundle/nifi-snmp-processors/pom.xml | 2 -- pom.xml| 9 - 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/nifi-nar-bundles/nifi-snmp-bundle/nifi-snmp-processors/pom.xml b/nifi-nar-bundles/nifi-snmp-bundle/nifi-snmp-processors/pom.xml index 021436a54e..51c6aab698 100644 --- a/nifi-nar-bundles/nifi-snmp-bundle/nifi-snmp-processors/pom.xml +++ b/nifi-nar-bundles/nifi-snmp-bundle/nifi-snmp-processors/pom.xml @@ -54,8 +54,6 @@ language governing permissions and limitations under the License. --> com.fasterxml.jackson.core jackson-databind -2.12.3 -compile diff --git a/pom.xml b/pom.xml index e8329815ec..2bd95ab6f1 100644 --- a/pom.xml +++ b/pom.xml @@ -108,7 +108,7 @@ 1.7.36 2.1.0 9.4.46.v20220331 -2.13.1 +2.13.2 2.3.5 2.3.3 3.0.8 @@ -510,6 +510,13 @@ aspectjweaver ${aspectj.version} + +com.fasterxml.jackson +jackson-bom +${jackson.version} +pom +import + org.xerial.snappy
[nifi] branch support/nifi-1.16 updated (74e97c51c7 -> bec94ef4d8)
This is an automated email from the ASF dual-hosted git repository. joewitt pushed a change to branch support/nifi-1.16 in repository https://gitbox.apache.org/repos/asf/nifi.git from 74e97c51c7 NIFI-9868 new 118b205e8a NIFI-9869 Upgraded Apache POI from 5.0.0 to 5.2.2 new 404a5fa0ba NIFI-9872 Upgraded azure-sdk-bom to 1.2.0 for Sensitive Properties new 5a6d93851a NIFI-9831: XML schema inference fix for XML elements with attributes new 13b67ec6b1 NIFI-9870 Upgraded Jetty from 9.4.45 to 9.4.46 new 772023a799 NIFI-9873 Upgraded Kotlin to 1.6.20 new bec94ef4d8 NIFI-7253 Upgraded Jackson to 2.13.2 using jackson-bom The 6 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../nifi-property-protection-azure/pom.xml | 39 - .../nifi-email-processors/pom.xml | 3 +- .../persistence/TemplateDeserializerTest.groovy| 66 -- .../persistence/TestTemplateDeserializer.java} | 27 - nifi-nar-bundles/nifi-media-bundle/pom.xml | 19 +++ .../nifi-poi-bundle/nifi-poi-processors/pom.xml| 2 +- .../nifi-snmp-bundle/nifi-snmp-processors/pom.xml | 2 - .../apache/nifi/xml/inference/XmlRecordSource.java | 7 --- .../org/apache/nifi/xml/TestInferXmlSchema.java| 8 +++ pom.xml| 19 ++- 10 files changed, 70 insertions(+), 122 deletions(-) delete mode 100644 nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/groovy/org/apache/nifi/persistence/TemplateDeserializerTest.groovy copy nifi-nar-bundles/{nifi-beats-bundle/nifi-beats-processors/src/test/java/org/apache/nifi/processors/beats/frame/TestBeatsFrame.java => nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/persistence/TestTemplateDeserializer.java} (60%)
[nifi] 01/06: NIFI-9869 Upgraded Apache POI from 5.0.0 to 5.2.2
This is an automated email from the ASF dual-hosted git repository. joewitt pushed a commit to branch support/nifi-1.16 in repository https://gitbox.apache.org/repos/asf/nifi.git commit 118b205e8a14e59fd40383db33c76570db4c7ba5 Author: exceptionfactory AuthorDate: Mon Apr 4 13:46:49 2022 -0500 NIFI-9869 Upgraded Apache POI from 5.0.0 to 5.2.2 - Upgraded direct dependencies in nifi-email-processors and nifi-poi-processors - Upgraded transitive dependency in nifi-media-bundle This closes #5927 Signed-off-by: Mike Thomsen --- .../nifi-email-bundle/nifi-email-processors/pom.xml | 3 ++- nifi-nar-bundles/nifi-media-bundle/pom.xml| 19 +++ .../nifi-poi-bundle/nifi-poi-processors/pom.xml | 2 +- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/pom.xml b/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/pom.xml index 9f0392302b..dca73cb6bb 100644 --- a/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/pom.xml +++ b/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/pom.xml @@ -26,6 +26,7 @@ jar 5.5.7 +5.2.2 @@ -117,7 +118,7 @@ org.apache.poi poi-scratchpad -5.0.0 +${poi.version} org.apache.nifi diff --git a/nifi-nar-bundles/nifi-media-bundle/pom.xml b/nifi-nar-bundles/nifi-media-bundle/pom.xml index 3705e76e85..847a5c86bc 100644 --- a/nifi-nar-bundles/nifi-media-bundle/pom.xml +++ b/nifi-nar-bundles/nifi-media-bundle/pom.xml @@ -26,6 +26,10 @@ 1.16.1-SNAPSHOT pom + +5.2.2 + + nifi-media-processors nifi-media-nar @@ -46,6 +50,21 @@ jsoup 1.14.2 + +org.apache.poi +poi +${poi.version} + + +org.apache.poi +poi-scratchpad +${poi.version} + + +org.apache.poi +poi-ooxml +${poi.version} + diff --git a/nifi-nar-bundles/nifi-poi-bundle/nifi-poi-processors/pom.xml b/nifi-nar-bundles/nifi-poi-bundle/nifi-poi-processors/pom.xml index 21cbd01e82..acb30bfa12 100644 --- a/nifi-nar-bundles/nifi-poi-bundle/nifi-poi-processors/pom.xml +++ b/nifi-nar-bundles/nifi-poi-bundle/nifi-poi-processors/pom.xml @@ -17,7 +17,7 @@ 4.0.0 -5.0.0 +5.2.2
[nifi] 03/06: NIFI-9831: XML schema inference fix for XML elements with attributes
This is an automated email from the ASF dual-hosted git repository. joewitt pushed a commit to branch support/nifi-1.16 in repository https://gitbox.apache.org/repos/asf/nifi.git commit 5a6d93851a5cff025a0a19e13b6fbb138e8383ec Author: Peter Gyori AuthorDate: Thu Mar 24 16:04:11 2022 +0100 NIFI-9831: XML schema inference fix for XML elements with attributes This closes #5895. Signed-off-by: Peter Turcsanyi --- .../main/java/org/apache/nifi/xml/inference/XmlRecordSource.java | 7 --- .../src/test/java/org/apache/nifi/xml/TestInferXmlSchema.java | 8 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/xml/inference/XmlRecordSource.java b/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/xml/inference/XmlRecordSource.java index 3698aa690b..3192e141aa 100644 --- a/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/xml/inference/XmlRecordSource.java +++ b/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/xml/inference/XmlRecordSource.java @@ -116,13 +116,6 @@ public class XmlRecordSource implements RecordSource { arrayNode.addElement(childNode); childNodes.put(childName, arrayNode); } - -final Iterator childAttributeIterator = childStartElement.getAttributes(); -while (childAttributeIterator.hasNext()) { -final Attribute attribute = (Attribute) childAttributeIterator.next(); -final String attributeName = attribute.getName().getLocalPart(); -childNodes.put(attributeName, new XmlTextNode(attributeName, attribute.getValue())); -} } } diff --git a/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/xml/TestInferXmlSchema.java b/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/xml/TestInferXmlSchema.java index 3271ceb8e3..b5bdd76025 100644 --- a/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/xml/TestInferXmlSchema.java +++ b/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/xml/TestInferXmlSchema.java @@ -50,6 +50,9 @@ public class TestInferXmlSchema { public void testFlatXml() throws IOException { final RecordSchema schema = inferSchema("src/test/resources/xml/person.xml", false); +assertEquals(7, schema.getFieldCount()); + +assertSame(RecordFieldType.STRING, schema.getDataType("ID").get().getFieldType()); assertSame(RecordFieldType.STRING, schema.getDataType("NAME").get().getFieldType()); assertSame(RecordFieldType.INT, schema.getDataType("AGE").get().getFieldType()); assertSame(RecordFieldType.STRING, schema.getDataType("COUNTRY").get().getFieldType()); @@ -63,6 +66,8 @@ public class TestInferXmlSchema { public void testFieldsFromAllRecordsIncluded() throws IOException { final RecordSchema schema = inferSchema("src/test/resources/xml/people_nested.xml", true); +assertEquals(8, schema.getFieldCount()); + assertSame(RecordFieldType.STRING, schema.getDataType("ID").get().getFieldType()); assertSame(RecordFieldType.STRING, schema.getDataType("NAME").get().getFieldType()); assertSame(RecordFieldType.INT, schema.getDataType("AGE").get().getFieldType()); @@ -89,6 +94,9 @@ public class TestInferXmlSchema { @Test public void testStringFieldWithAttributes() throws IOException { final RecordSchema schema = inferSchema("src/test/resources/xml/TextNodeWithAttribute.xml", true); + +assertEquals(3, schema.getFieldCount()); + assertSame(RecordFieldType.INT, schema.getDataType("num").get().getFieldType()); assertSame(RecordFieldType.STRING, schema.getDataType("name").get().getFieldType());
[nifi] 02/06: NIFI-9872 Upgraded azure-sdk-bom to 1.2.0 for Sensitive Properties
This is an automated email from the ASF dual-hosted git repository. joewitt pushed a commit to branch support/nifi-1.16 in repository https://gitbox.apache.org/repos/asf/nifi.git commit 404a5fa0ba2055264ad2c5d379a85dd97266ad35 Author: exceptionfactory AuthorDate: Mon Apr 4 17:09:10 2022 -0500 NIFI-9872 Upgraded azure-sdk-bom to 1.2.0 for Sensitive Properties - Replaced individual Azure dependencies with azure-sdk-bom in nifi-property-protection-azure - Removed woodstox-core and stax2-api exclusions - Refactored TemplateDeserializer test class to avoid dependency on specific XML implementation This closes #5929 Signed-off-by: Mike Thomsen --- .../nifi-property-protection-azure/pom.xml | 39 - .../persistence/TemplateDeserializerTest.groovy| 66 -- .../nifi/persistence/TestTemplateDeserializer.java | 36 3 files changed, 47 insertions(+), 94 deletions(-) diff --git a/nifi-commons/nifi-property-protection-azure/pom.xml b/nifi-commons/nifi-property-protection-azure/pom.xml index c2992487fd..cae926c820 100644 --- a/nifi-commons/nifi-property-protection-azure/pom.xml +++ b/nifi-commons/nifi-property-protection-azure/pom.xml @@ -21,6 +21,17 @@ 1.16.1-SNAPSHOT nifi-property-protection-azure + + + +com.azure +azure-sdk-bom +1.2.0 +import +pom + + + org.apache.nifi @@ -35,20 +46,11 @@ com.azure azure-security-keyvault-secrets -4.3.3 com.azure azure-core-http-netty - -com.fasterxml.woodstox -woodstox-core - - -org.codehaus.woodstox -stax2-api - io.netty netty-tcnative-boringssl-static @@ -58,20 +60,11 @@ com.azure azure-security-keyvault-keys -4.3.3 com.azure azure-core-http-netty - -com.fasterxml.woodstox -woodstox-core - - -org.codehaus.woodstox -stax2-api - io.netty netty-tcnative-boringssl-static @@ -81,26 +74,16 @@ com.azure azure-identity -1.3.4 com.azure azure-core-http-netty - -com.fasterxml.woodstox -woodstox-core - - -org.codehaus.woodstox -stax2-api - com.azure azure-core-http-okhttp -1.7.1 org.mockito diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/groovy/org/apache/nifi/persistence/TemplateDeserializerTest.groovy b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/groovy/org/apache/nifi/persistence/TemplateDeserializerTest.groovy deleted file mode 100644 index c90868b3d9..00 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/groovy/org/apache/nifi/persistence/TemplateDeserializerTest.groovy +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.nifi.persistence - -import org.apache.nifi.web.api.dto.TemplateDTO -import org.junit.After -import org.junit.Before -import org.junit.BeforeClass -import org.junit.Test -import org.junit.runner.RunWith -import org.junit.runners.JUnit4 -import org.slf4j.Logger -import org.slf4j.LoggerFactory - -@RunWith(J
[nifi] 05/06: NIFI-9873 Upgraded Kotlin to 1.6.20
This is an automated email from the ASF dual-hosted git repository. joewitt pushed a commit to branch support/nifi-1.16 in repository https://gitbox.apache.org/repos/asf/nifi.git commit 772023a799712eee09d8bd22da1041ee7c26158f Author: exceptionfactory AuthorDate: Mon Apr 4 20:21:52 2022 -0500 NIFI-9873 Upgraded Kotlin to 1.6.20 This closes #5930 Signed-off-by: Mike Thomsen --- pom.xml | 8 1 file changed, 8 insertions(+) diff --git a/pom.xml b/pom.xml index 9fbe47b8c9..e8329815ec 100644 --- a/pom.xml +++ b/pom.xml @@ -99,6 +99,7 @@ UTF-8 UTF-8 2014 +1.6.20 4.9.3 3.12.0 4.5.13 @@ -551,6 +552,13 @@ import pom + +org.jetbrains.kotlin +kotlin-bom +${kotlin.version} +import +pom +
[nifi] 04/06: NIFI-9870 Upgraded Jetty from 9.4.45 to 9.4.46
This is an automated email from the ASF dual-hosted git repository. joewitt pushed a commit to branch support/nifi-1.16 in repository https://gitbox.apache.org/repos/asf/nifi.git commit 13b67ec6b1f04c7fda7047f47da808f07c0d508d Author: exceptionfactory AuthorDate: Mon Apr 4 14:53:24 2022 -0500 NIFI-9870 Upgraded Jetty from 9.4.45 to 9.4.46 This closes #5928 Signed-off-by: Paul Grey --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c0d414ff87..9fbe47b8c9 100644 --- a/pom.xml +++ b/pom.xml @@ -106,7 +106,7 @@ 1.70 1.7.36 2.1.0 -9.4.45.v20220203 +9.4.46.v20220331 2.13.1 2.3.5 2.3.3
[nifi] branch main updated: NIFI-7253 Upgraded Jackson to 2.13.2 using jackson-bom
This is an automated email from the ASF dual-hosted git repository. exceptionfactory pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/nifi.git The following commit(s) were added to refs/heads/main by this push: new d78c65996e NIFI-7253 Upgraded Jackson to 2.13.2 using jackson-bom d78c65996e is described below commit d78c65996e1cb46d98e2b449f21de25d0d1d0a05 Author: Mike Thomsen AuthorDate: Sat Mar 26 10:31:08 2022 -0400 NIFI-7253 Upgraded Jackson to 2.13.2 using jackson-bom This closes #5904 Signed-off-by: David Handermann --- nifi-nar-bundles/nifi-snmp-bundle/nifi-snmp-processors/pom.xml | 2 -- pom.xml| 9 - 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/nifi-nar-bundles/nifi-snmp-bundle/nifi-snmp-processors/pom.xml b/nifi-nar-bundles/nifi-snmp-bundle/nifi-snmp-processors/pom.xml index cf9cd2fa16..81d95301e2 100644 --- a/nifi-nar-bundles/nifi-snmp-bundle/nifi-snmp-processors/pom.xml +++ b/nifi-nar-bundles/nifi-snmp-bundle/nifi-snmp-processors/pom.xml @@ -54,8 +54,6 @@ language governing permissions and limitations under the License. --> com.fasterxml.jackson.core jackson-databind -2.12.3 -compile diff --git a/pom.xml b/pom.xml index c4eb4d7478..f295fae127 100644 --- a/pom.xml +++ b/pom.xml @@ -108,7 +108,7 @@ 1.7.36 2.1.0 9.4.46.v20220331 -2.13.1 +2.13.2 2.3.5 2.3.3 3.0.8 @@ -510,6 +510,13 @@ aspectjweaver ${aspectj.version} + +com.fasterxml.jackson +jackson-bom +${jackson.version} +pom +import + org.xerial.snappy
[nifi] branch main updated: NIFI-9873 Upgraded Kotlin to 1.6.20
This is an automated email from the ASF dual-hosted git repository. mthomsen pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/nifi.git The following commit(s) were added to refs/heads/main by this push: new dd612a861a NIFI-9873 Upgraded Kotlin to 1.6.20 dd612a861a is described below commit dd612a861a5d5a457297202edabee704872699dd Author: exceptionfactory AuthorDate: Mon Apr 4 20:21:52 2022 -0500 NIFI-9873 Upgraded Kotlin to 1.6.20 This closes #5930 Signed-off-by: Mike Thomsen --- pom.xml | 8 1 file changed, 8 insertions(+) diff --git a/pom.xml b/pom.xml index 51c2ac12fb..c4eb4d7478 100644 --- a/pom.xml +++ b/pom.xml @@ -99,6 +99,7 @@ UTF-8 UTF-8 2014 +1.6.20 4.9.3 3.12.0 4.5.13 @@ -551,6 +552,13 @@ import pom + +org.jetbrains.kotlin +kotlin-bom +${kotlin.version} +import +pom +
[nifi] branch main updated: NIFI-9870 Upgraded Jetty from 9.4.45 to 9.4.46
This is an automated email from the ASF dual-hosted git repository. greyp pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/nifi.git The following commit(s) were added to refs/heads/main by this push: new c7fa3a2a1c NIFI-9870 Upgraded Jetty from 9.4.45 to 9.4.46 c7fa3a2a1c is described below commit c7fa3a2a1c4a63196e72c19af8ddfa836ad0af6c Author: exceptionfactory AuthorDate: Mon Apr 4 14:53:24 2022 -0500 NIFI-9870 Upgraded Jetty from 9.4.45 to 9.4.46 This closes #5928 Signed-off-by: Paul Grey --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index dfc0faf13d..51c2ac12fb 100644 --- a/pom.xml +++ b/pom.xml @@ -106,7 +106,7 @@ 1.70 1.7.36 2.1.0 -9.4.45.v20220203 +9.4.46.v20220331 2.13.1 2.3.5 2.3.3
[nifi] branch main updated: NIFI-9831: XML schema inference fix for XML elements with attributes
This is an automated email from the ASF dual-hosted git repository. turcsanyi pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/nifi.git The following commit(s) were added to refs/heads/main by this push: new 3ef2ad9943 NIFI-9831: XML schema inference fix for XML elements with attributes 3ef2ad9943 is described below commit 3ef2ad99434461e603e7cd8b611906db05866568 Author: Peter Gyori AuthorDate: Thu Mar 24 16:04:11 2022 +0100 NIFI-9831: XML schema inference fix for XML elements with attributes This closes #5895. Signed-off-by: Peter Turcsanyi --- .../main/java/org/apache/nifi/xml/inference/XmlRecordSource.java | 7 --- .../src/test/java/org/apache/nifi/xml/TestInferXmlSchema.java | 8 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/xml/inference/XmlRecordSource.java b/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/xml/inference/XmlRecordSource.java index 3698aa690b..3192e141aa 100644 --- a/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/xml/inference/XmlRecordSource.java +++ b/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/xml/inference/XmlRecordSource.java @@ -116,13 +116,6 @@ public class XmlRecordSource implements RecordSource { arrayNode.addElement(childNode); childNodes.put(childName, arrayNode); } - -final Iterator childAttributeIterator = childStartElement.getAttributes(); -while (childAttributeIterator.hasNext()) { -final Attribute attribute = (Attribute) childAttributeIterator.next(); -final String attributeName = attribute.getName().getLocalPart(); -childNodes.put(attributeName, new XmlTextNode(attributeName, attribute.getValue())); -} } } diff --git a/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/xml/TestInferXmlSchema.java b/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/xml/TestInferXmlSchema.java index 3271ceb8e3..b5bdd76025 100644 --- a/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/xml/TestInferXmlSchema.java +++ b/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/xml/TestInferXmlSchema.java @@ -50,6 +50,9 @@ public class TestInferXmlSchema { public void testFlatXml() throws IOException { final RecordSchema schema = inferSchema("src/test/resources/xml/person.xml", false); +assertEquals(7, schema.getFieldCount()); + +assertSame(RecordFieldType.STRING, schema.getDataType("ID").get().getFieldType()); assertSame(RecordFieldType.STRING, schema.getDataType("NAME").get().getFieldType()); assertSame(RecordFieldType.INT, schema.getDataType("AGE").get().getFieldType()); assertSame(RecordFieldType.STRING, schema.getDataType("COUNTRY").get().getFieldType()); @@ -63,6 +66,8 @@ public class TestInferXmlSchema { public void testFieldsFromAllRecordsIncluded() throws IOException { final RecordSchema schema = inferSchema("src/test/resources/xml/people_nested.xml", true); +assertEquals(8, schema.getFieldCount()); + assertSame(RecordFieldType.STRING, schema.getDataType("ID").get().getFieldType()); assertSame(RecordFieldType.STRING, schema.getDataType("NAME").get().getFieldType()); assertSame(RecordFieldType.INT, schema.getDataType("AGE").get().getFieldType()); @@ -89,6 +94,9 @@ public class TestInferXmlSchema { @Test public void testStringFieldWithAttributes() throws IOException { final RecordSchema schema = inferSchema("src/test/resources/xml/TextNodeWithAttribute.xml", true); + +assertEquals(3, schema.getFieldCount()); + assertSame(RecordFieldType.INT, schema.getDataType("num").get().getFieldType()); assertSame(RecordFieldType.STRING, schema.getDataType("name").get().getFieldType());