Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with multipart forms and NUL character #12

Open
diegosuarez opened this issue Jul 16, 2014 · 1 comment
Open

Issue with multipart forms and NUL character #12

diegosuarez opened this issue Jul 16, 2014 · 1 comment
Assignees

Comments

@diegosuarez
Copy link

Hello,

We have a little issue with multipart forms. With only the import of the parsereq and the use of "parsereq.init();" and nothing more, our origins are getting a "\0" (NUL char) after all chunks of multipart body data: we're getting something like

-----------------------------1604889593984783231595295988
Content-Disposition: form-data; name="option"

com_facileforms\0
-----------------------------1604889593984783231595295988
Content-Disposition: form-data; name="Itemid"

my-form-content\0
-----------------------------1604889593984783231595295988

The expected behaviour would be to get a CR +LF, instead of a NUL+LF. The \0 is not visible, I included it for clarity, after seeing it in a hexdump of the request in the origin.

Varnish version is 3.0.5 and libvmod-parsereq is the latest commit on master.

Do you have any idea of what could be happening?
Thanks and regards.

@diegosuarez
Copy link
Author

Hello,

We've tried to fix this issue commenting the line 793 of vmod_parsereq_core.c:

//     p_body_end[0] = 0;

It appears to solve the problem, and we haven't detected any side effects of it.

@xcir xcir self-assigned this Jul 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants