From issues-return-96683-archive-asf-public=cust-asf.ponee.io@nifi.apache.org Fri May 1 21:43:02 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 15FF7180634 for ; Fri, 1 May 2020 23:43:01 +0200 (CEST) Received: (qmail 16957 invoked by uid 500); 1 May 2020 21:43:01 -0000 Mailing-List: contact issues-help@nifi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nifi.apache.org Delivered-To: mailing list issues@nifi.apache.org Received: (qmail 16948 invoked by uid 99); 1 May 2020 21:43:01 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 May 2020 21:43:01 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 876C2E00B7 for ; Fri, 1 May 2020 21:43:00 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 0673B78027F for ; Fri, 1 May 2020 21:43:00 +0000 (UTC) Date: Fri, 1 May 2020 21:43:00 +0000 (UTC) From: "Otto Fowler (Jira)" To: issues@nifi.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (NIFI-7420) HandleHttpRequest puts form data content into attributes MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/NIFI-7420?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Otto Fowler updated NIFI-7420: ------------------------------ Description: HandleHttpParameters writes attributes for get return from HttpServletRequest.getParameters(). getParameters() is defined as returning a value for each query part OR form data value. As such, large bits of data, send as part of multipart/form data will end up in the attributes, which is not what we want, and that data is recorded elsewhere. If the filename is set on the form data, it will NOT be in the list. But the file name is optional, so each parameter _could_ have large amounts of data. The processor also does not document writing this attribute. The processor should NOT write parameter values for parameters that are part of the form data if possible. an example from log attributes: {noformat} Key: 'http.multipart.content.type' Value: 'text/plain' Key: 'http.multipart.fragments.sequence.number' Value: '1' Key: 'http.multipart.fragments.total.number' Value: '3' Key: 'http.multipart.name' Value: 'upload-data' Key: 'http.multipart.size' Value: '18' Key: 'http.param.DataTwo' Value: 'DATA TWO!!!!' Key: 'http.param.data1' Value: 'DATA ONE!!!' Key: 'http.param.upload-data' Value: 'Flowfile content!!' {noformat} was: HandleHttpParameters writes attributes for get return from HttpServletRequest.getParameters(). getParameters() is defined as returning a value for each query part OR form data value. As such, large bits of data, send as part of multipart/form data will end up in the attributes, which is not what we want. The processor also does not document writing this attribute. The processor should NOT write parameter values for parameters that are part of the form data if possible. an example from log attributes: {noformat} Key: 'http.multipart.content.type' Value: 'text/plain' Key: 'http.multipart.fragments.sequence.number' Value: '1' Key: 'http.multipart.fragments.total.number' Value: '3' Key: 'http.multipart.name' Value: 'upload-data' Key: 'http.multipart.size' Value: '18' Key: 'http.param.DataTwo' Value: 'DATA TWO!!!!' Key: 'http.param.data1' Value: 'DATA ONE!!!' Key: 'http.param.upload-data' Value: 'Flowfile content!!' {noformat} > HandleHttpRequest puts form data content into attributes > -------------------------------------------------------- > > Key: NIFI-7420 > URL: https://issues.apache.org/jira/browse/NIFI-7420 > Project: Apache NiFi > Issue Type: Bug > Reporter: Otto Fowler > Assignee: Otto Fowler > Priority: Major > > HandleHttpParameters writes attributes for get return from HttpServletRequest.getParameters(). > getParameters() is defined as returning a value for each query part OR form data value. > As such, large bits of data, send as part of multipart/form data will end up in the attributes, which is not what we want, and that data is recorded elsewhere. If the filename is set on the form data, it will NOT be in the list. But the file name is optional, so each parameter _could_ have large amounts of data. > The processor also does not document writing this attribute. > The processor should NOT write parameter values for parameters that are part of the form data if possible. > an example from log attributes: > {noformat} > Key: 'http.multipart.content.type' > Value: 'text/plain' > Key: 'http.multipart.fragments.sequence.number' > Value: '1' > Key: 'http.multipart.fragments.total.number' > Value: '3' > Key: 'http.multipart.name' > Value: 'upload-data' > Key: 'http.multipart.size' > Value: '18' > Key: 'http.param.DataTwo' > Value: 'DATA TWO!!!!' > Key: 'http.param.data1' > Value: 'DATA ONE!!!' > Key: 'http.param.upload-data' > Value: 'Flowfile content!!' > {noformat} -- This message was sent by Atlassian Jira (v8.3.4#803005)