[jira] [Commented] (HTTPCLIENT-1859) FormBodyPartBuilder.java does not properly escape the name and filename subfields in the ContentDisposition header

2017-06-23 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-1859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16060873#comment-16060873
 ] 

ASF subversion and git services commented on HTTPCLIENT-1859:
-

Commit 6d583c7d8cc41a188a190218a6489541b79cf35a in httpcomponents-client's 
branch refs/heads/4.5.x from [~kwri...@metacarta.com]
[ https://git-wip-us.apache.org/repos/asf?p=httpcomponents-client.git;h=6d583c7 
]

HTTPCLIENT-1859: Encode header name, filename appropriately


> FormBodyPartBuilder.java does not properly escape the name and filename 
> subfields in the ContentDisposition header
> --
>
> Key: HTTPCLIENT-1859
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1859
> Project: HttpComponents HttpClient
>  Issue Type: Bug
>Reporter: Karl Wright
>Assignee: Oleg Kalnichevski
> Attachments: HTTPCLIENT-1859.patch, HTTPCLIENT-1859.patch
>
>
> The ContentDisposition header, used in multi-part forms, has a name and 
> filename subfield; these need to be escaped using unix-standard backslash 
> character stuffing, but FormBodyPartBuilder does not currently do this.  It 
> should.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org
For additional commands, e-mail: dev-h...@hc.apache.org



[jira] [Commented] (HTTPCLIENT-1859) FormBodyPartBuilder.java does not properly escape the name and filename subfields in the ContentDisposition header

2017-06-23 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-1859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16060866#comment-16060866
 ] 

ASF subversion and git services commented on HTTPCLIENT-1859:
-

Commit f0c7a3448428fcd7e5b292bca8517c09bc71c3c6 in httpcomponents-client's 
branch refs/heads/4.6.x from [~kwri...@metacarta.com]
[ https://git-wip-us.apache.org/repos/asf?p=httpcomponents-client.git;h=f0c7a34 
]

HTTPCLIENT-1859: Encode header name, filename appropriately


> FormBodyPartBuilder.java does not properly escape the name and filename 
> subfields in the ContentDisposition header
> --
>
> Key: HTTPCLIENT-1859
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1859
> Project: HttpComponents HttpClient
>  Issue Type: Bug
>Reporter: Karl Wright
>Assignee: Oleg Kalnichevski
> Attachments: HTTPCLIENT-1859.patch, HTTPCLIENT-1859.patch
>
>
> The ContentDisposition header, used in multi-part forms, has a name and 
> filename subfield; these need to be escaped using unix-standard backslash 
> character stuffing, but FormBodyPartBuilder does not currently do this.  It 
> should.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org
For additional commands, e-mail: dev-h...@hc.apache.org



[jira] [Commented] (HTTPCLIENT-1859) FormBodyPartBuilder.java does not properly escape the name and filename subfields in the ContentDisposition header

2017-06-23 Thread Karl Wright (JIRA)

[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-1859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16060714#comment-16060714
 ] 

Karl Wright commented on HTTPCLIENT-1859:
-

Sorry about that!  Done now.

I did also push to master inadvertantly; I can revert that if need be.


> FormBodyPartBuilder.java does not properly escape the name and filename 
> subfields in the ContentDisposition header
> --
>
> Key: HTTPCLIENT-1859
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1859
> Project: HttpComponents HttpClient
>  Issue Type: Bug
>Reporter: Karl Wright
>Assignee: Oleg Kalnichevski
> Attachments: HTTPCLIENT-1859.patch, HTTPCLIENT-1859.patch
>
>
> The ContentDisposition header, used in multi-part forms, has a name and 
> filename subfield; these need to be escaped using unix-standard backslash 
> character stuffing, but FormBodyPartBuilder does not currently do this.  It 
> should.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org
For additional commands, e-mail: dev-h...@hc.apache.org



[jira] [Commented] (HTTPCLIENT-1859) FormBodyPartBuilder.java does not properly escape the name and filename subfields in the ContentDisposition header

2017-06-23 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-1859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16060713#comment-16060713
 ] 

ASF subversion and git services commented on HTTPCLIENT-1859:
-

Commit 004c8be08bc7f347348a28dd19147684916f9f54 in httpcomponents-client's 
branch refs/heads/HTTPCLIENT_1859 from [~kwri...@metacarta.com]
[ https://git-wip-us.apache.org/repos/asf?p=httpcomponents-client.git;h=004c8be 
]

HTTPCLIENT-1859: Encode header name, filename appropriately


> FormBodyPartBuilder.java does not properly escape the name and filename 
> subfields in the ContentDisposition header
> --
>
> Key: HTTPCLIENT-1859
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1859
> Project: HttpComponents HttpClient
>  Issue Type: Bug
>Reporter: Karl Wright
>Assignee: Oleg Kalnichevski
> Attachments: HTTPCLIENT-1859.patch, HTTPCLIENT-1859.patch
>
>
> The ContentDisposition header, used in multi-part forms, has a name and 
> filename subfield; these need to be escaped using unix-standard backslash 
> character stuffing, but FormBodyPartBuilder does not currently do this.  It 
> should.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org
For additional commands, e-mail: dev-h...@hc.apache.org



[jira] [Commented] (HTTPCLIENT-1859) FormBodyPartBuilder.java does not properly escape the name and filename subfields in the ContentDisposition header

2017-06-23 Thread Oleg Kalnichevski (JIRA)

[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-1859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16060631#comment-16060631
 ] 

Oleg Kalnichevski commented on HTTPCLIENT-1859:
---

[~kwri...@metacarta.com] I can see the 
[HTTPCLIENT_1859|https://git-wip-us.apache.org/repos/asf?p=httpcomponents-client.git;a=shortlog;h=refs/heads/HTTPCLIENT_1859]
 branch in the repo but I see no commits to the branch. Could you please push 
your changes to that branch and I'll merge them to master, 4.5.x and 4.6.x 
branches.

Oleg

> FormBodyPartBuilder.java does not properly escape the name and filename 
> subfields in the ContentDisposition header
> --
>
> Key: HTTPCLIENT-1859
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1859
> Project: HttpComponents HttpClient
>  Issue Type: Bug
>Reporter: Karl Wright
>Assignee: Oleg Kalnichevski
> Attachments: HTTPCLIENT-1859.patch, HTTPCLIENT-1859.patch
>
>
> The ContentDisposition header, used in multi-part forms, has a name and 
> filename subfield; these need to be escaped using unix-standard backslash 
> character stuffing, but FormBodyPartBuilder does not currently do this.  It 
> should.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org
For additional commands, e-mail: dev-h...@hc.apache.org



[jira] [Commented] (HTTPCLIENT-1859) FormBodyPartBuilder.java does not properly escape the name and filename subfields in the ContentDisposition header

2017-06-22 Thread Karl Wright (JIRA)

[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-1859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16059427#comment-16059427
 ] 

Karl Wright commented on HTTPCLIENT-1859:
-

With the help of local git wizards, I was able to set up a dev branch for this 
issue with the fix.

HTTPCLIENT_1859

Thanks!


> FormBodyPartBuilder.java does not properly escape the name and filename 
> subfields in the ContentDisposition header
> --
>
> Key: HTTPCLIENT-1859
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1859
> Project: HttpComponents HttpClient
>  Issue Type: Bug
>Reporter: Karl Wright
>Assignee: Karl Wright
> Attachments: HTTPCLIENT-1859.patch, HTTPCLIENT-1859.patch
>
>
> The ContentDisposition header, used in multi-part forms, has a name and 
> filename subfield; these need to be escaped using unix-standard backslash 
> character stuffing, but FormBodyPartBuilder does not currently do this.  It 
> should.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org
For additional commands, e-mail: dev-h...@hc.apache.org



[jira] [Commented] (HTTPCLIENT-1859) FormBodyPartBuilder.java does not properly escape the name and filename subfields in the ContentDisposition header

2017-06-22 Thread Karl Wright (JIRA)

[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-1859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16059398#comment-16059398
 ] 

Karl Wright commented on HTTPCLIENT-1859:
-

My git-fu is not yet good enough to set up remote personal dev branches so I'm 
going to need to leave this here as a patch, I'm afraid.  I could manage a push 
to master, or a cherry-pick into an existing remote branch, but beyond that I'm 
stuck.  I've updated the patch to include a test.



> FormBodyPartBuilder.java does not properly escape the name and filename 
> subfields in the ContentDisposition header
> --
>
> Key: HTTPCLIENT-1859
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1859
> Project: HttpComponents HttpClient
>  Issue Type: Bug
>Reporter: Karl Wright
>Assignee: Karl Wright
> Attachments: HTTPCLIENT-1859.patch, HTTPCLIENT-1859.patch
>
>
> The ContentDisposition header, used in multi-part forms, has a name and 
> filename subfield; these need to be escaped using unix-standard backslash 
> character stuffing, but FormBodyPartBuilder does not currently do this.  It 
> should.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org
For additional commands, e-mail: dev-h...@hc.apache.org



[jira] [Commented] (HTTPCLIENT-1859) FormBodyPartBuilder.java does not properly escape the name and filename subfields in the ContentDisposition header

2017-06-22 Thread Oleg Kalnichevski (JIRA)

[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-1859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16059263#comment-16059263
 ] 

Oleg Kalnichevski commented on HTTPCLIENT-1859:
---

[~kwri...@metacarta.com], The fix itself looks reasonable to me. Ideally it 
should have some test code with it as I believe it can be reasonably easily 
unit tested. 

It would also make things much easier if you could commit your changes either 
to a dev branch in the project repository or to your personal fork on GitHub.

Oleg

> FormBodyPartBuilder.java does not properly escape the name and filename 
> subfields in the ContentDisposition header
> --
>
> Key: HTTPCLIENT-1859
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1859
> Project: HttpComponents HttpClient
>  Issue Type: Bug
>Reporter: Karl Wright
>Assignee: Karl Wright
> Attachments: HTTPCLIENT-1859.patch
>
>
> The ContentDisposition header, used in multi-part forms, has a name and 
> filename subfield; these need to be escaped using unix-standard backslash 
> character stuffing, but FormBodyPartBuilder does not currently do this.  It 
> should.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org
For additional commands, e-mail: dev-h...@hc.apache.org



[jira] [Commented] (HTTPCLIENT-1859) FormBodyPartBuilder.java does not properly escape the name and filename subfields in the ContentDisposition header

2017-06-22 Thread Karl Wright (JIRA)

[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-1859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16059193#comment-16059193
 ] 

Karl Wright commented on HTTPCLIENT-1859:
-

[~olegk], please review...


> FormBodyPartBuilder.java does not properly escape the name and filename 
> subfields in the ContentDisposition header
> --
>
> Key: HTTPCLIENT-1859
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1859
> Project: HttpComponents HttpClient
>  Issue Type: Bug
>Reporter: Karl Wright
>Assignee: Karl Wright
> Attachments: HTTPCLIENT-1859.patch
>
>
> The ContentDisposition header, used in multi-part forms, has a name and 
> filename subfield; these need to be escaped using unix-standard backslash 
> character stuffing, but FormBodyPartBuilder does not currently do this.  It 
> should.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org
For additional commands, e-mail: dev-h...@hc.apache.org



[jira] [Commented] (HTTPCLIENT-1859) FormBodyPartBuilder.java does not properly escape the name and filename subfields in the ContentDisposition header

2017-06-22 Thread Karl Wright (JIRA)

[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-1859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16059170#comment-16059170
 ] 

Karl Wright commented on HTTPCLIENT-1859:
-

Here's the method that needs to be called to escape both the header "name" 
field and the header "filename" field:

{code}
  private static String encodeForHeader(final String headerName) {
if (headerName == null) {
  return null;
}
final StringBuilder sb = new StringBuilder();
for (int i = 0; i < headerName.length(); i++) {
  final char x = headerName.charAt(i);
  if (x == '"' || x == '\\' || x == '\r') {
sb.append("\\");
  }
  sb.append(x);
}
return sb.toString();
  }
{code}


> FormBodyPartBuilder.java does not properly escape the name and filename 
> subfields in the ContentDisposition header
> --
>
> Key: HTTPCLIENT-1859
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1859
> Project: HttpComponents HttpClient
>  Issue Type: Bug
>Reporter: Karl Wright
>Assignee: Karl Wright
>
> The ContentDisposition header, used in multi-part forms, has a name and 
> filename subfield; these need to be escaped using unix-standard backslash 
> character stuffing, but FormBodyPartBuilder does not currently do this.  It 
> should.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org
For additional commands, e-mail: dev-h...@hc.apache.org



[jira] [Commented] (HTTPCLIENT-1859) FormBodyPartBuilder.java does not properly escape the name and filename subfields in the ContentDisposition header

2017-06-22 Thread Karl Wright (JIRA)

[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-1859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16059152#comment-16059152
 ] 

Karl Wright commented on HTTPCLIENT-1859:
-

Yes; same thing, but thank you for referring to the proper IETF document.


> FormBodyPartBuilder.java does not properly escape the name and filename 
> subfields in the ContentDisposition header
> --
>
> Key: HTTPCLIENT-1859
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1859
> Project: HttpComponents HttpClient
>  Issue Type: Bug
>Reporter: Karl Wright
>Assignee: Karl Wright
>
> The ContentDisposition header, used in multi-part forms, has a name and 
> filename subfield; these need to be escaped using unix-standard backslash 
> character stuffing, but FormBodyPartBuilder does not currently do this.  It 
> should.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org
For additional commands, e-mail: dev-h...@hc.apache.org



[jira] [Commented] (HTTPCLIENT-1859) FormBodyPartBuilder.java does not properly escape the name and filename subfields in the ContentDisposition header

2017-06-22 Thread Julian Reschke (JIRA)

[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-1859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16059102#comment-16059102
 ] 

Julian Reschke commented on HTTPCLIENT-1859:


"unix-standard backslash character stuffing"?

Are you referring to RFC 822's "quoted-string" syntax?

> FormBodyPartBuilder.java does not properly escape the name and filename 
> subfields in the ContentDisposition header
> --
>
> Key: HTTPCLIENT-1859
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1859
> Project: HttpComponents HttpClient
>  Issue Type: Bug
>Reporter: Karl Wright
>Assignee: Karl Wright
>
> The ContentDisposition header, used in multi-part forms, has a name and 
> filename subfield; these need to be escaped using unix-standard backslash 
> character stuffing, but FormBodyPartBuilder does not currently do this.  It 
> should.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org
For additional commands, e-mail: dev-h...@hc.apache.org